Re: Decimal places

2015-11-14 Thread Tore Nilsen
Have you had a look at numberFormat? You can set the numberFormat to display 2 
decimals.

Tore

> 14. nov. 2015 kl. 18.20 skrev Richmond :
> 
> So I have started a "baby calculator" to help 5 year old kids get their heads 
> round European coins
> and it has an output box where added coins go.
> 
> Now, if I add 2 Euros to 50 cents the field displays 2.5
> 
> and
> 
> I want it to display 2.50.
> 
> So would be most grateful if somebody could put me right in this respect.
> 
> Probably something very simple.
> 
> Richmond.
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Decimal places

2015-11-14 Thread Tore Nilsen

> 14. nov. 2015 kl. 18.28 skrev Richmond :
> 
> No, but I have felt stupid many times before :)

That makes two of us.

Tore
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Decimal places

2015-11-14 Thread Tore Nilsen
This works for me:

on mouseUp
   set the numberFormat to 0.00
   put 2 + 0.5 into tNumber
   put tNumber into field 1
end mouseUp


Tore


> 14. nov. 2015 kl. 18.33 skrev Richmond :
> 
> On 14/11/15 19:31, Tore Nilsen wrote:
>>> 14. nov. 2015 kl. 18.28 skrev Richmond :
>>> 
>>> No, but I have felt stupid many times before :)
>> That makes two of us.
>> 
>> Tore
>> 
> But  set the numberFormat of fld "fff" to "#.##"
> 
> doesn't work . . .
> 
> Richmond.
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Decimal places

2015-11-14 Thread Tore Nilsen
My home language is Norwegian, and I write both Bokmål and Nynorsk (landsmaal) 
equally well. My dialect is from the western part of Norway, and it is closest 
to Nynorsk. All Norwegians are taught both versions of written Norwegian, 
although some find it difficult to write both equally well.

Tore


> 14. nov. 2015 kl. 18.41 skrev Richmond :
> 
> On 14/11/15 19:35, Tore Nilsen wrote:
>> This works for me:
>> 
>> on mouseUp
>>set the numberFormat to 0.00
>>put 2 + 0.5 into tNumber
>>put tNumber into field 1
>> end mouseUp
>> 
>> 
>> Tore
> 
> Great!
> 
> What is your home language, as in mine (Scots) we would write "screivet" for 
> "skrev"?
> 
> I wid jalouse it mun be Norwegian {Landsmaal? Bokmaal?] as the '-sen' til the 
> end o thon
> name . . . forbye.
> 
> Richmond.
> 
>> 
>> 
>>> 14. nov. 2015 kl. 18.33 skrev Richmond :
>>> 
>>> On 14/11/15 19:31, Tore Nilsen wrote:
>>>>> 14. nov. 2015 kl. 18.28 skrev Richmond :
>>>>> 
>>>>> No, but I have felt stupid many times before :)
>>>> That makes two of us.
>>>> 
>>>> Tore
>>>> 
>>> But  set the numberFormat of fld "fff" to "#.##"
>>> 
>>> doesn't work . . .
>>> 
>>> Richmond.
>>> 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your 
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com <mailto:use-livecode@lists.runrev.com>
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode 
> <http://lists.runrev.com/mailman/listinfo/use-livecode>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: LiveCode Mac, importing images from iPhone

2016-01-03 Thread Tore Nilsen
The ability to access different kinds of media from Pages, Keynote etc. is an 
OSX feature that is not implemented in LiveCode. Since images are stored in a 
library that is a bundle (much like an application on OSX) there is no simple 
way of getting these files into LiveCode either, as far as I know. Applications 
like Pages etc. get their information from the associated databases, and there 
may be ways to access these.

You can find these pictures manually by selecting the library in Finder and 
choose “Show Package Contents” when right clicking the library. You then choose 
the folder “Masters" and navigate to the folder for the appropriate year (2016 
if it was today) then the folder for the appropriate month, thereafter the 
folder for the appropriate date, and finally the folder that contains your last 
import.

It is easier to open your the “Photos” application and export your images to a 
folder you have chosen yourself. You can then import these images into LiveCode 
from this folder. Another alternative is to share/export the images from the 
iPhone to a folder where they can be accessed from LiveCode. You may use 
Dropbox for this, as you can use “answer file" to access files in the 
Dropbox-folder on the Mac.

Best of luck

Tore Nilsen


> 3. jan. 2016 kl. 11.44 skrev tkuyp...@telenet.be:
> 
> Hi,
> 
> I’m building an app running on a Mac to manage a large amount of products in 
> a store.
> It searches in a database using a barcode reader, add product info, pricing, 
> remarks, stock, etc. to a database.
> 
> But for the product image I would like to be able to take a picture on my 
> iPhone and place it into the productfiche automatically.
> When I take a picture, it automatically shows up in Photos, when I do this in 
> Pages or KeyNote, I select “Photos” from the “media” sidebar and all my pics 
> from my iPhone are visible.
> 
> But when I try to do this from within LC (7.1.1 or 8.0dp12) nothing happens.
> 
> Is there something I need to setup on the Mac to make these visible, or is 
> this some nice OSX feature which is not supported by LIveCode?
> 
> 
> Met vriendelijke groeten,
> Warm Regards,
> 
> 
> 
> Ton Kuypers
> +32 (0) 477 739 530
> 
> Steenweg op Leopoldsburg 100 • B-2490 • Balen • Belgium
> www.publishingtools4u.com
> 
> 
> 
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Image Scaling Problem

2016-01-19 Thread Tore Nilsen
In the Property Inspector, set the "Lock size and position" to true in the Size 
& Position panel

Tore


> 19. jan. 2016 kl. 13.16 skrev Hillen Richard :
> 
> Hello List,
> 
> I just imported  a 500x500px image as control into a stack, resized it using 
> its handles to about 100 x 100 px, saved the stack and closed livecode.
> After restarting livecode and reopening the stack the size of the image was 
> again 500 x 500px. 
> What may I do to make the scaling permanent?
> 
> 
> (Mac OS X 10.11.2, LiveCode 6.7.8)
> 
> Thank You in Advance,
> Richard
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Graphic effects - Feather Edges of Rects

2016-01-31 Thread Tore Nilsen
You need to make the group with the object wider and taller than the object 
with the graphic effects in order to show the graphic effects “undisturbed”. 
You must also set the lockLoc (Lock size & position) of the group to true. 

Tore Nilsen


> 31. jan. 2016 kl. 10.29 skrev Phil Jimmieson :
> 
> I've seen clipping of graphic effects when the object with the effect is in a 
> group. For  example I had a round rect with a drop shadow with other objects 
> placed inside it. When I grouped them, the drop shadow became clipped. I 
> removed the drop shadow from the rect and applied it to the group instead - 
> which, in my case, stopped the clipping. If you're unable to do that, perhaps 
> extending the group's margin will prevent the effect from being clipped?
> 
> Sent from my iPhone
> 
>> On 31 Jan 2016, at 04:02, Terry Judd  wrote:
>> 
>> On 31/01/2016 1:56 pm, "use-livecode on behalf of Sannyasin
>> Brahmanathaswami" > bra...@hindu.org> wrote:
>> 
>>> Does anyone have any method to ³feather² the edges of a fld, rect or grc?
>>> 
>>> Any inner glow or outer glow leaves a sharp edge on the object no matter
>>> what we do.
>>> 
>>> Any options there?
>> 
>> Even if you use both inner and outer glow in combination with no object
>> boder?
>> 
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: clipboard access on mobile (iOS)

2016-02-02 Thread Tore Nilsen
Have you tried to put the text you want into an invisible field, and then copy 
the text from this field using the copy command in your code? From the way I 
understand the documentation this should work on all platforms.

Tore
> 2. feb. 2016 kl. 19.49 skrev Ben Rubinstein :
> 
> Hi all,
> 
> Before I give up; is there anyway to programmatically set the clipboard on 
> iOS? (Extra points for general mobile solution, but right now my need is on 
> iOS.)
> 
> At this point I'd accept filthy hacks (it's an internal tool). I want to be 
> able to set the clipboard to some text, and can't find a way. Is there one?
> 
> TIA,
> 
> Ben
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Modifying Drop-Down Menus on the fly

2016-02-10 Thread Tore Nilsen
What you are looking for is:

set the text of button “myMenu” to “myMenuList”

This can be called in a variety of handlers, at the latest in a mouseDown 
handler in the menu button itself.

Here is an example I used with my student the other day. They were supposed to 
make an application where the user should choose a starting point and an ending 
point for a journey, from a list of places along the route. This is a situation 
where you would like to filter out the starting point from the possible choices 
as ending point, and it is a good example of what you want to achieve. Here is 
a script in the menuPick handler in the first menu, that sets the options for 
the second menu:

on menuPick pItemName
   put the text of me into tText
   repeat with i = 1 to the number of lines of tText
  if pItemName = line i of tText then
 delete line i of tText
 exit repeat
  end if
   end repeat
   set text of button "No 2" to tText
   show button "No 2"
end menuPick


This script could also be put in a mouseDown handler in the button called “No 
2” with som alterations:

on mouseDown 
   put the text of button “No 1" into tText
put the label of button “No 1” into tStart
   repeat with i = 1 to the number of lines of tText
  if tStart = line i of tText then
 delete line i of tText
 exit repeat
  end if
   end repeat
   set text of button "No 2" to tText
   show button "No 2"
end mouseDown

The number of "case entries" (menuLines) for an option menu, only apply to 
Windows and Linux, as they will show the option menu as a combo-box. The 
menuLines property defines how many lines will be displayed in the drop down 
list of a combo-box, without the need for scrolling. The total number of items 
in the menu can be any number, as the user can scroll further down the list in 
the combo-box.

Tore Nilsen





> 9. feb. 2016 kl. 20.44 skrev Francis Nugent Dixon :
> 
> Hi from Sunny Brittany (at least it was this morning !),
> 
> After many years of using buttons in my stacks, I am
> discovering the joys of using “Pull Down” menus (and
> about time too !).
> 
> I can change the script “cases” with the “set script” command,
> but I also want to know how to change the value of the menu options
> on the fly,  for example, if I have a menu option “Show Table”
> in my button, once I have shown the table, how can I modify
> the menu option to show “Hide Table”, assuming that I also
> set the case in the script to the new value, with new instructions.
> 
> I thought that it was possible to modify any button/field options
> on the fly, but I can’t grab the syntax of this requirement.
> 
> I also see that the number of case entries is defined in the button 
> specs. Can I change this also, or do I just set a maximum value
> 
> I know that Klaus has played with menus (seen on forums)
> Maybe he has an answer ?
> 
> -Francis
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: LiveCode for the Hobbyists

2016-02-27 Thread Tore Nilsen
 using LiveCode as a tool for teaching programming.

Another area into which LiveCode could venture, is the ever-growing area of 
code-club initiatives. Many of the aforementioned resources could be targeted 
at this segment, and both teachers and other users of LiveCode could use these 
resources to offer LiveCode as a tool for children and youth who would like to 
learn how to program, out of school.

I do appreciate the fact that these suggestions will demand personell, time and 
financial support from LiveCode, and that the company may not have the 
sufficient amount of resources to back such initiatives. I still think it is 
important that the company invests time and resources to reach out to the 
educational sector, and that it does so in a manner that will make them a 
viable player in this market. They need to be visible in the most important 
arena where the future customers and users are. 

In the last five years, I have been attending the BETT-show in London, on the 
behalf of my school on several occasions. For those unfamiliar with the 
BETT-show, it is the largest expo of tech in education in Europe, and it 
attracts thousands of teachers, school management, network administrators and 
others with a connection to education, from all over Europe. Even though I 
often find most of what happens there to be of lesser interest, I can’t help 
but thinking that LiveCode should consider participating. I don’t know the cost 
of participating, and my guess is it would not be cheap to have a decent sized 
stand. In my opinion the most successful stands are those who not only put a 
product on display. In order to make an impact, it should be possible to have 
fringe seminars within the stand, where the audience could see demonstrations 
of the capabilities of LiveCode. Such demonstrations could also be in area 
where educators could help out.

I hope that someone would make an initiative to bring together educators who 
use LiveCode on different levels, to discuss how we can contribute to bring 
LiveCode into schools, as a part of the conference in Edinburgh. I am attending 
the conference, and I would very much like to take part in both a discussion 
about the future of LiveCode in education, and any initiative that may come 
from it.

Regards
Tore Nilsen

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: LiveCode for Educators (was LiveCode for the Hobbyists)

2016-02-27 Thread Tore Nilsen

> 27. feb. 2016 kl. 21.51 skrev Richard Gaskin :
> 
> What could happen if we change "LiveCode" there to "we”?
> 
> The company has many deep technical obligations to complete, and education is 
> an area that really needs the insights of education specialists to guide it.
> 
> And since we're talking about things that would be scripted, who better to do 
> that than educators who script?
> 
> How shall we proceed with identifying the tools and other resources we need 
> to fulfill the vision you've outlined here?
> 
> We set up a section of the forums for educational outreach:
> http://forums.livecode.com/viewforum.php?f=107 
> 
> 
> I would encourage you to consider posting your thoughts there, and let's see 
> if we can put together a team and make it happen.


I do agree that this is a kind of task where we, as educators and users of 
LiveCode should do the actual work. However, I think it is vitally important 
that the outcome of such a process has an active backing from the company, and 
this was my reason for using the phrase I did. I fully accept the challenges 
and obligations that LiveCode as a company has to meet, and I also see much of 
this and the effort that has been done in the last couple of years as key to 
any success in the education sector.

I will post my thoughts in the forums, and I will also encourage others who 
work in education to take part in discussions about what we can do to help put 
LiveCode in the hands of more teachers and students. I will also try to come up 
with suggestions for tools and resources I personally will find useful, and 
hope others will as well. It may be helpful to share different national and 
local curriculums, in order to identify useful resources and common approaches 
to different parts of said curriculums.

One thing I really would hope LiveCode will do, is to find room for this as a 
part of the program for the conference in Edinburgh in August. I have already 
registered and will attend. If there is anything I can do to help facilitate 
this, I am more than happy to do so. 

Regards
Tore N
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: LiveCode for the Hobbyists

2016-02-28 Thread Tore Nilsen

> 28. feb. 2016 kl. 19.11 skrev Robert Mann :
> 
> Use open sourced for in house commercial application! whouaou!! 
> that does not really sound very open source.. kind of twisting the game in
> way.

This is where I think you get open source wrong. Open source does not mean non 
commercial. It is totally in line with the licence to develop commercial 
applications with the community version of LiveCode. Open source only means 
that you can not lock in the source code for your program. 

If you think that you need to protect your source code, you then need to deploy 
it with an indy or business version of LiveCode. The good thing about the 
community version is that you may well use it to develop your application, and 
you do not have to buy an indy or business version until you think you have an 
application worth protecting.

You then open the stack you created in community version with your new version 
of LiveCode, set the password to protect the code and deploy it to whatever 
platform you like. And to be fair, if you think that your application has any 
financial meritt, the cost of an Indy version should not frighten anyone from 
paying for it. If your application is not going to generate more than the cost 
of the indy version, then you probably should not bother bringing it to the 
market. 

I can see how it would come in handy, also for hobbies to be able to lock down 
their applications from time to time. However, in order for LiveCode as a 
company, to make enough money to support the development of LiveCode, they need 
to make a clear distinction between free versions of LiveCode and payed version 
of the application.

In order to shoehorn in a version of LiveCode between community and indy, they 
would seriously need to cripple the community version. As it is today, with 
LiveCode 8 you get more functionality in the community version, as you can 
deploy to html5, without paying anything. Developers with an Indy version would 
need to pay an extra $499 to deploy to html5. 

Regards 

Tore Nilsen
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Export & LC8 & Browser widget

2016-03-01 Thread Tore Nilsen
You must take the distance from the left egde of the screen and from the top of 
the screen into consideration when you try to export a snapshot of a browser 
instance. The browsers position is measured from the topLeft of the screen, not 
the card I think.

Tore
> 1. mar. 2016 kl. 20.41 skrev Terence Heaford :
> 
> I have been unable to get the Browser widget to print as I
> suspect there is no option for this so I thought I would try a snapshot using 
> this:
> 
> export snapshot from rect (the rect of widget "Chart") of this card to tVar 
> as PNG
> 
> put tVar into image "myImage"
> 
> 
> Unfortunately it does not capture the image in the correct rect of the card 
> even though the dimensions seem correct.
> 
> Am I missing something in the application of the export snapshot command.
> 
> 
> Thanks
> 
> Terry
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Export & LC8 & Browser widget

2016-03-01 Thread Tore Nilsen
It may not be the most elegant solution, but this works for me:

on mouseUp

put the rect widget "Chart" into tRect

add left of this stack to item 1 of tRect

add left of this stack to item 3 of tRect

add top of this stack to item 2 of tRect

add top of this stack to item 4 of tRect

export snapshot from rect tRect to tVar as PNG

put tVar into image "myImage"

end mouseUp


Tore
> 1. mar. 2016 kl. 20.57 skrev Tore Nilsen :
> 
> You must take the distance from the left egde of the screen and from the top 
> of the screen into consideration when you try to export a snapshot of a 
> browser instance. The browsers position is measured from the topLeft of the 
> screen, not the card I think.
> 
> Tore
>> 1. mar. 2016 kl. 20.41 skrev Terence Heaford :
>> 
>> I have been unable to get the Browser widget to print as I
>> suspect there is no option for this so I thought I would try a snapshot 
>> using this:
>> 
>> export snapshot from rect (the rect of widget "Chart") of this card to tVar 
>> as PNG
>> 
>> put tVar into image "myImage"
>> 
>> 
>> Unfortunately it does not capture the image in the correct rect of the card 
>> even though the dimensions seem correct.
>> 
>> Am I missing something in the application of the export snapshot command.
>> 
>> 
>> Thanks
>> 
>> Terry
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Export & LC8 & Browser widget

2016-03-01 Thread Tore Nilsen
I think Terence has a menuBar of his own making in the stack, that would count 
for the extra 22 pixels on the card being pushed upward on the mac version, but 
still a part of the card height.

Tore


> 1. mar. 2016 kl. 23.22 skrev J. Landman Gay :
> 
> On 3/1/2016 3:57 PM, Terence Heaford wrote:
>> 
>>> On 1 Mar 2016, at 21:32, J. Landman Gay 
>>> wrote:
>>> 
>>> "To export a snapshot for a portion of a stack you use the form:
>>> export snapshot from rect[angle] of window windowID to ... Where
>>> windowId is the windowId property of the required stack."
>> 
>> This does not work correctly on a Mac for the reason given
>> previously.
>> 
>> The top and bottom of the image exported has shifted down by the
>> depth of the menubar. put the rect widget "Chart" into tRect
>> 
>> export snapshot from rectangle tRect of window (the windowId of
>> window "Test") to tVar as PNG
> 
> It works here on a Mac. I happened to have a tree view widget at hand, but 
> any of them should work.
> 
> put the windowid of this stack into twid
> export snapshot from rect (the rect of widget "tree view") \
>   of window twid to file "imgTest.png" as PNG
> 
> No adjustments needed.
> -- 
> Jacqueline Landman Gay | jac...@hyperactivesw.com 
> 
> HyperActive Software   | http://www.hyperactivesw.com 
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com 
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode 
> 
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: LC8DP15 feedback-IDE Issues

2016-03-02 Thread Tore Nilsen

> 2. mar. 2016 kl. 09.39 skrev Mark Waddingham :
> 
> On 2016-03-02 06:46, J. Landman Gay wrote:
>> I confess my first reaction was that LC needs an interface designer.
> 
> Ah - yes - those magical 'interface designers' who you just ask to give you 
> the perfect UI that *everyone* immediately understands and knows how to use 
> and works exactly how each individual wants it to work ;)
> 
> Warmest Regards,
> 
> Mark.
> 

Yes, we would prefer those magical interface designers whenever they are 
available. If not, we will accept the interface designers who are able to speak 
the lingo of grumpy software engineers, and who can facilitate fruitful 
discussions that may lead to an optimal amalgamation of UI/UE and awesome code. 
But magical would be better off course. ;)

Regards
Tore


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: LC8DP15 feedback-IDE Issues

2016-03-02 Thread Tore Nilsen
Have you tried looking for it in LC 8, which seems to be the version discussed 
in this thread?

Tore


> 2. mar. 2016 kl. 18.02 skrev Mark Wieder :
> 
> On 03/02/2016 08:23 AM, Peter TB Brett wrote:
>> On 02/03/2016 16:15, Mark Wieder wrote:
>>> On 03/01/2016 11:39 PM, Peter TB Brett wrote:
>>> 
 You can double click on an item in the Project Browser to select it on
 the card.
>>> 
>>> OK - that's getting pinned on the wall as well.
>>> Is this stuff documented somewhere?
>> 
>> See http://quality.livecode.com/show_bug.cgi?id=16609
>> 
>>> The User Guide is missing in action (bug 17054) and the "All User
>>> Guides" menu item just opens the dictionary which, at least on linux, is
>>> somewhat less than actually functional.
>> 
>> It opens the "Guides" tab of the dictionary stack, which on platforms
>> where the browser widget works, displays the user guides (funnily enough).
> 
> OK. Fair enough. So I opened the User Guide for LC 7.1.2, and that brought up 
> the pdf (User Guide 4.5 - Revision 19), which has no mention of the Project 
> Browser.
> 
> In 7.1.2, selecting "All Guides" goes to the LC website, where I can select 
> the "Beginners-Guide" (not sure why the hyphenation), then control-F to 
> search for "Project". There's a single image there, and I assume that this is 
> the same content that would appear if there were an actual User Guide pdf. I 
> do see some explanatory text, but nothing like the discussions here. And I'm 
> still mystified about the lock icon with the tooltip of "Show" and the 
> explanation of "Selectability".
> 
> -- 
> Mark Wieder
> ahsoftw...@gmail.com 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com 
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode 
> 
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: [Blog] Script Only Stacks

2016-03-03 Thread Tore Nilsen
I think TextWrangler is a better choice than TextEdit for this purpose. In 
textWrangler you can specify both UTF 16 and Unix line endings.

Tore
> 3. mar. 2016 kl. 19.57 skrev Tim Bleiler :
> 
> 
> 
>> On Mar 3, 2016, at 1:38 PM, Richard Gaskin  
>> wrote:
>> 
>> I wonder if it needs to use LC's native line ending, ASCII 10, rather than 
>> ASCII 13 that many Mac tools use.
> 
> Thanks Richard,
> 
> First, do you know of way to set this in TextEdit? I don’t see anything that 
> can change that. Second, if that is the case, then the descriptions of how to 
> use the script only files or how Livecode processes them probably will need 
> to change. Should we call this a bug?
> 
> Tim
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: [OT] An XFCE launcher that will hide behind Livecode standalones

2016-03-07 Thread Tore Nilsen
Or you could just read in the actual stacks to use from a document, put the 
info into a field, and put a mouseUp handler in the field that responds to the 
clickLine to launch the chosen stack. Then all you would have to do is to add 
or change information in the document. You could hav the launcher read from the 
document automatically in time, or at start up.

Tore

> 7. mar. 2016 kl. 19.17 skrev RM :
> 
> That's all very fine in theory until you realise that new standalones will be
> continually added, so one will have to be continually rewriting the launcher 
> and
> reinstalling it, along with the new standalones, on all the machines in my 
> school.
> 
> I have subsequently tired out using an XFCE panel with 6 rows that hides 
> 'always' or 'intelligently',
> which, while not ideal, will probably have to do for the moment.
> 
> In a perfect world (Ha, Ha, Ha) as standalones were added to a folder there 
> would be symbolic links
> added to some sort of blanket launcher/desktop that, on a standalone being 
> launched would not 'hide' or somesuch, but would just remain behind the 
> standalone.
> 
> This can be done by setting up launchers on the XFCE desktop and not having 
> any panels, but
> this has to be done on a machine-by-machine basis which is a 'major fag' 
> frankly.
> 
> Richmond.
> 
> On 7.03.2016 02:08, [-hh] wrote:
>> Why don't you write a stack, that has a launch button for each standalone, 
>> and minimizes to a small square at topRight after each launch?
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: [OT] An XFCE launcher that will hide behind Livecode standalones

2016-03-07 Thread Tore Nilsen
You could also have LiveCode check the folder automatically, in timed 
intervals, put the files of the folder into a variable, filter out unwanted 
files and put the variable into the field. Then all you would have to take care 
of was to add the apps to the folder.

Tore

> 7. mar. 2016 kl. 19.22 skrev Tore Nilsen :
> 
> Or you could just read in the actual stacks to use from a document, put the 
> info into a field, and put a mouseUp handler in the field that responds to 
> the clickLine to launch the chosen stack. Then all you would have to do is to 
> add or change information in the document. You could hav the launcher read 
> from the document automatically in time, or at start up.
> 
> Tore
> 
>> 7. mar. 2016 kl. 19.17 skrev RM :
>> 
>> That's all very fine in theory until you realise that new standalones will be
>> continually added, so one will have to be continually rewriting the launcher 
>> and
>> reinstalling it, along with the new standalones, on all the machines in my 
>> school.
>> 
>> I have subsequently tired out using an XFCE panel with 6 rows that hides 
>> 'always' or 'intelligently',
>> which, while not ideal, will probably have to do for the moment.
>> 
>> In a perfect world (Ha, Ha, Ha) as standalones were added to a folder there 
>> would be symbolic links
>> added to some sort of blanket launcher/desktop that, on a standalone being 
>> launched would not 'hide' or somesuch, but would just remain behind the 
>> standalone.
>> 
>> This can be done by setting up launchers on the XFCE desktop and not having 
>> any panels, but
>> this has to be done on a machine-by-machine basis which is a 'major fag' 
>> frankly.
>> 
>> Richmond.
>> 
>> On 7.03.2016 02:08, [-hh] wrote:
>>> Why don't you write a stack, that has a launch button for each standalone, 
>>> and minimizes to a small square at topRight after each launch?
>>> 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your 
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Setting url of browser widget, incompatible characters

2016-03-23 Thread Tore Nilsen
I have been working with the browser widget this morning, trying to use it to 
show/play media files, and I have come across some oddities with some 
characters  in file names being incompatible with the widget. The script I 
originally used use is as follows:

on mouseUp

answer file "Choose file"

put "file://"& it into tPath

put tPath into field "url"

set url of widget "browser" to tPath

end mouseUp


This would work unless the file name contained space characters. Changing the 
script to replace space characters with %20 would rectify this problem. 

on mouseUp

answer file "Choose file"

put "file://"& it into tPath

repeat with i = 1 to the number of chars of tPath

if char i of tPath is space then

put "%20" into char i of tPath

end if

end repeat

put tPath into field "url"

set url of widget "browser" to tPath

end mouseUp


However, in some instances, a space character between two words would not be 
recognised as such. I tried to delete only the original space character in 
Finder, and add it again, but it would still not be recognised. Only when I 
wrote the file name from scratch, space characters and all, would the space 
character be recognised and the url would be set. 

Here are some urls that do not work:
file:///Users/torenilsen/Documents/MultimedieLab/Musikk/01%20My%20My,%20Hey%20Hey%20(Out%20of%20the
 Blue).m4p

file:///Users/torenilsen/Documents/MultimedieLab/Musikk/05%20The%20Piano%20Has%20Been%20Drinking%20(Not
 Me).m4a

file:///Users/torenilsen/Documents/MultimedieLab/Musikk/07%20Hearts%20and%20Bones%20(Live%20In%20New%20York
 2011).m4p

file:///Users/torenilsen/Documents/MultimedieLab/Musikk/12%20Blues%20Can't%20Even%20Find
 Me.m4a


As one can see, the last space character is not replaced. All of these examples 
contains either apostrophes or parenthesises. Removing these characters from 
the file name does not help either. In order to have these urls working, the 
file name has to be retyped in Finder. Have anyone else come across this. I am 
using LC 8 dp 16 and OS X 10.11.4 (beta).

Regard
Tore Nilsen
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Setting url of browser widget, incompatible characters

2016-03-23 Thread Tore Nilsen
I’ll try that. Thank you.

Tore

> 23. mar. 2016 kl. 13.22 skrev Peter TB Brett :
> 
> On 23/03/2016 12:11, Tore Nilsen wrote:
>> This would work unless the file name contained space characters. Changing 
>> the script to replace space characters with %20 would rectify this problem.
>> 
>> on mouseUp
>> 
>> answer file "Choose file"
>> 
>> put "file://"& it into tPath
>> 
>> repeat with i = 1 to the number of chars of tPath
>> 
>> if char i of tPath is space then
>> 
>> put "%20" into char i of tPath
>> 
>> end if
>> 
>> end repeat
>> 
>> put tPath into field "url"
>> 
>> set url of widget "browser" to tPath
>> 
>> end mouseUp
> 
> Hi Tore,
> 
> You should use URLEncode().  For example:
> 
>on mouseUp
>   answer file "Choose file"
>   put "file://" & URLEncode(it) into tUrl
>   put tUrl into field "url"
>   set url of widget "browser" to tUrl
>end mouseUp
> 
> I'm just in the process of updating the documentation for the browser widget 
> to make this clearer.
> 
> Peter
> 
> -- 
> Dr Peter Brett 
> LiveCode Open Source Team
> 
> LiveCode 2016 Conference: https://livecode.com/edinburgh-2016/
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Setting url of browser widget, incompatible characters

2016-03-23 Thread Tore Nilsen
It did not work. URLEncode also encodes “/“  to %2 and spaces to + as you can 
see:
file://%2FUsers%2Ftorenilsen%2FDocuments%2FMultimedieLab%2FMusikk%2F01+My+My%2C+Hey+Hey+%28Out+of+the+Blue%29.m4p



Tore


> 23. mar. 2016 kl. 13.24 skrev Tore Nilsen :
> 
> I’ll try that. Thank you.
> 
> Tore
> 
>> 23. mar. 2016 kl. 13.22 skrev Peter TB Brett :
>> 
>> On 23/03/2016 12:11, Tore Nilsen wrote:
>>> This would work unless the file name contained space characters. Changing 
>>> the script to replace space characters with %20 would rectify this problem.
>>> 
>>> on mouseUp
>>> 
>>> answer file "Choose file"
>>> 
>>> put "file://"& it into tPath
>>> 
>>> repeat with i = 1 to the number of chars of tPath
>>> 
>>> if char i of tPath is space then
>>> 
>>> put "%20" into char i of tPath
>>> 
>>> end if
>>> 
>>> end repeat
>>> 
>>> put tPath into field "url"
>>> 
>>> set url of widget "browser" to tPath
>>> 
>>> end mouseUp
>> 
>> Hi Tore,
>> 
>> You should use URLEncode().  For example:
>> 
>>   on mouseUp
>>  answer file "Choose file"
>>  put "file://" & URLEncode(it) into tUrl
>>  put tUrl into field "url"
>>  set url of widget "browser" to tUrl
>>   end mouseUp
>> 
>> I'm just in the process of updating the documentation for the browser widget 
>> to make this clearer.
>> 
>>Peter
>> 
>> -- 
>> Dr Peter Brett 
>> LiveCode Open Source Team
>> 
>> LiveCode 2016 Conference: https://livecode.com/edinburgh-2016/
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Setting url of browser widget, incompatible characters

2016-03-23 Thread Tore Nilsen
Thank you this is very useful. As file names can also contain other characters 
that may be changed during urlEncoding I will have to experiment to take them 
into consideration as well. From what I can see I will need to convert 
apostrophes, parenthesises and commas back to their original characters. 


Tore


> 23. mar. 2016 kl. 14.11 skrev Trevor DeVore :
> 
> On Wed, Mar 23, 2016 at 8:30 AM, Tore Nilsen  wrote:
> 
>> It did not work. URLEncode also encodes “/“  to %2 and spaces to + as you
>> can see:
>> 
>> file://%2FUsers%2Ftorenilsen%2FDocuments%2FMultimedieLab%2FMusikk%2F01+My+My%2C+Hey+Hey+%28Out+of+the+Blue%29.m4p
>> 
> 
> This is a function I use to convert filenames into file urls.
> 
> /**
> * \brief Converts a LiveCode filename to a file url.
> *
> * \param pFilename The filename to convert.
> *
> * Each item of the filename will be escaped and "file://" will be prefixed.
> *
> * \return File url.
> */
> function fileConvertToFileURL pFilename
>   local theItem, i
> 
>   set the itemDelimiter to "/"
> 
>   repeat with i = 1 to the number of items of pFilename
>  put item i of pFilename into theItem
>  if i is 1 AND theItem contains ":" then next repeat # skip C:/
> 
>  put URLEncode(theItem) into theItem
>  replace "+" with "%20" in theItem
>  replace "*" with "%2A" in theItem
>  put theItem into item i of pFilename
>   end repeat
> 
>   # [case 1] Windows C:/ paths need to start with a "//"
>   # [case 2] If path starts with "//" then it is a network path. Add
>   # an extra "/" so that domain is considered localhost.
>   if char 1 of pFilename is not "/" then
>  put "/" before pFilename
>   else if pFilename begins with "//" then
>  delete char 1 to 2 of pFilename
>   end if
> 
>   return "file://" & pFilename
> end fileConvertToFileURL
> 
> -- 
> Trevor DeVore
> ScreenSteps
> www.screensteps.com-www.clarify-it.com
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Can a widget be in the background?

2016-03-24 Thread Tore Nilsen
A group with the background behaviour will appear on each new card you create 
after you have made the group. If you know you are going to need a background 
on many cards, then make the background group on the first card, before you add 
the rest of the cards.

Tore
> 24. mar. 2016 kl. 06.02 skrev Earthednet-wp :
> 
> Scott,
> Thanks! You are the man!
> Best,
> Bill
> 
> William Prothero
> http://es.earthednet.org
> 
>> On Mar 23, 2016, at 8:30 PM, Scott Rossi  wrote:
>> 
>> Use "Place Group" under the Object menu to place the group on any card
>> that doesn't already have it.  If you copy and paste, you'll wind up with
>> multiple copies of the group, instead of one group shared across multiple
>> cards.
>> 
>> Regards,
>> 
>> Scott Rossi
>> Creative Director
>> Tactile Media, UX/UI Design
>> 
>> 
>> 
>> 
>> On 3/23/16, 8:06 PM, "use-livecode on behalf of William Prothero"
>> > proth...@earthednet.org> wrote:
>> 
>>> Please excuse me for the trivial questions. I found that a group can be a
>>> shared background object.
>>> But, I¹m wondering if for a stack with quite a few cards, a new group
>>> with a shared background setting will only appear on new cards.
>>> 
>>> If I create a new stack with several cards, load several UI elements on
>>> the first card, group them, then set them to ³Background Behavior², they
>>> do not show up on all of the existing cards.
>>> 
>>> So, is there a way to make that background group then show up on all
>>> cards? Or, is it simply a matter of copying that group to each card that
>>> I want it on and setting ³Shared behavior² in the inspector?
>>> 
>>> Best,
>>> Bill
>>> 
 On Mar 23, 2016, at 4:37 PM, William Prothero 
 wrote:
 
 I¹m about the replace a menubar with the menubar widget in DP16. What
 I¹m wondering is if this can be set up so it¹s on every card, like
 objects can.
 
 Best,
 Bill
 
 
 
 William Prothero, Ph.D.
 University of California, Santa Barbara, Emeritus
 proth...@earthednet.org
 
 
 
 
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode
>>> 
>>> 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Richmond is on a roll.

2016-03-28 Thread Tore Nilsen
You sent me down a slippery slope here. I made some changes to the wipe 
version. If highlite of the Dissolve button is true, then it is a replication 
of the blend version you made. 

I should be grading some Norwegian tasks in preparation for tomorrow, but this 
is much more fun.

Tore

https://www.dropbox.com/s/oh3k09r6vqjaksd/WIPER%20with%20some%20changes.livecode?dl=0


> 28. mar. 2016 kl. 21.10 skrev RM :
> 
> Well, that, of course, is a matter of opinion:
> 
> https://www.dropbox.com/s/buvpf1h59lwahrz/WIPER.livecode.zip?dl=0
> 
> Richmond.
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


How to make a group scroll withut a visible scrollbar/by using one finger touch/scroll wheel on a mouse

2016-03-30 Thread Tore Nilsen
I have noticed that it is possible to hav a datagrid objekt scroll without a 
visible scrollbar, if the "scroll when vscrollbar is hidden” is set to true. 
when doing so, it is possible to use one finger/scroll wheel to scroll up and 
down in a datagrid, just as you can when the mouse hovers over a field. Since 
the datagrid is a grouped object, it should be possible to make other groups 
behave in the same way. Or at least, I think it should be possible. But I seem 
to be unable to find any help as to how to achieve this. Has anyone on the list 
found a way to make this happen.

Regards 
Tore
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: How to make a group scroll withut a visible scrollbar/by using one finger touch/scroll wheel on a mouse

2016-03-30 Thread Tore Nilsen
Thank you, it worked just the way I wanted it to work.

Tore
> 30. mar. 2016 kl. 21.42 skrev BNig :
> 
> Tore Nilsen wrote
>> I have noticed that it is possible to hav a datagrid objekt scroll without
>> a visible scrollbar, if the "scroll when vscrollbar is hidden” is set to
>> true. when doing so, it is possible to use one finger/scroll wheel to
>> scroll up and down in a datagrid, just as you can when the mouse hovers
>> over a field. Since the datagrid is a grouped object, it should be
>> possible to make other groups behave in the same way. Or at least, I think
>> it should be possible. But I seem to be unable to find any help as to how
>> to achieve this. Has anyone on the list found a way to make this happen.
>> 
>> Regards 
>> Tore
> 
> Hi Tore
> 
> for fields you can set the vScrollbar and set its width to 0
> 
> For groups this does not seem to work.
> 
> A workaround is to put a script like this into the script of the group
> 
> -
> on rawkeydown pKey
>   put 6 into tIncrement -- change increment here
>   switch pKey
>  case 65308
> set the vScroll of me to the vScroll of me + tIncrement
> break
>  case 65309
> set the vScroll of me to the vScroll of me - tIncrement
> break
>  default
> pass rawkeyDown
>   end switch
> end rawkeydown
> 
> 
> mind you this only works if the content of the group is taller than the
> group. You would have to set the lockLoc of the group to true.
> 
> Above script triggers a "scrollbarDrag" message. If you don't want this add
> some message locking.
> 
> Kind regards
> Bernd
> 
> 
> 
> --
> View this message in context: 
> http://runtime-revolution.278305.n4.nabble.com/How-to-make-a-group-scroll-withut-a-visible-scrollbar-by-using-one-finger-touch-scroll-wheel-on-a-moe-tp4702808p4702821.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Difficulty using Livecode.com

2016-03-31 Thread Tore Nilsen
If you want to access the app building course you should click on your name in 
the upper right corner of the web page (when you are logged in). You will then 
find a link to the app building course in the menu to the left of the new page 
which contains various information about your lisences.

Tore

> 1. apr. 2016 kl. 03.24 skrev Jim Byrnes :
> 
> As a new user I sometimes find Livecode.com difficult to use.  Generally 
> speaking I find some parts of it not very intuitive. Specifically I had this 
> problem:
> 
> [1] I go to Livecode.com and click on the Get Started button.
> 
> [2] That takes me here: https://livecode.com/download/. Since I have already 
> downloaded Livecode, I fill out my firstname and email and click the Get 
> Started button.
> 
> [3] I am informed (correctly) that this email is already associated with a 
> Livecode account, log in (here) instead. So I click (here) and go here: 
> https://livecode.com/download/ and log in.
> 
> [4] Then I am taken to here: http://livecode.com/account/products/livecode. 
> At this point I am wondering why I was not taken back to the getting started 
> page to move on in the app building tutorial.
> 
> [5] Not sure what I should do at this point. I go back to livecode.com.
> I fill out the form again and click the get started button and receive the 
> same message about logging in, but I just logged in and the site seems to 
> know I am logged in because my name is displayed in the upper right hand 
> corner.
> 
> Maybe the page is only for people that do not have an account, but sending a 
> person that has an account on an endless loop leads to a frustrating 
> experience.
> 
> Of course maybe I am misunderstanding something about the site, if so I would 
> appreciate someone showing me where I went wrong.
> 
> Regards,  Jim
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Difficulty using Livecode.com

2016-04-03 Thread Tore Nilsen
Try http://lessons.livecode.com

I don’t think this is a secure adress at all.

Regards
Tore
> 3. apr. 2016 kl. 18.22 skrev Jim Byrnes :
> 
> On 04/01/2016 05:13 PM, J. Landman Gay wrote:
>> On 4/1/2016 4:17 PM, Jim Byrnes wrote:
>>> Right now I am interested in learning Livecode on the desktop only,
>>> mobile may come later.  Looking at the list of lessons on the right I
>>> don't see anything that jumps out at me as being very graphics
>>> intensive. So is this version less graphics intensive?
>> 
>> Our Linux users can answer that better than I can, but for now bookmark
>> this:  I could find no way to get there by
>> clicking around the web site. That's a grave oversight.
>> 
>> On the lessons page, search for "images" and you'll get lots of hits.
>> Search for "graphics" too.
>> 
> 
> When I click on that link I get a message in 3 different browsers that it is 
> a Untrusted Connection. Maybe someone from the team should look into it.
> 
> Regards,  Jim
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Design Challenge -- Round Corner mask on images

2016-04-03 Thread Tore Nilsen
It works when you hold the mouse over the field with the inks in the blending 
section of the property inspector

Tore
> 3. apr. 2016 kl. 19.45 skrev RM :
> 
> Well: I must be rather stupid: but where-O-where is the 'Inks' button?
> 
> Richmond.
> 
> On 3.04.2016 20:38, J. Landman Gay wrote:
>> Put this in the message box:
>> 
>> put the text of the mousecontrol
>> 
>> Point the cursor to the inks menu button in the IDE and hit the return key.
>> 
>> -- 
>> Jacqueline Landman Gay | jac...@hyperactivesw.com
>> HyperActive Software   | http://www.hyperactivesw.com
>> 
>> 
>> 
>> On April 3, 2016 12:24:08 PM RM  wrote:
>> 
>>> Aha.
>>> 
>>> Well, if you could find a way to answer my post about inks I could get
>>> on with my batch processor :)
>>> 
>>> R.
>>> 
>>> On 3.04.2016 20:20, J. Landman Gay wrote:
 On April 3, 2016 11:59:33 AM RM  wrote:
 
> Of course the obvious question at this point is "why use a distributed
> work environment?"
 
 Because you work in a large company with different departments? Or you
 have a team of a dozen people, each with particular skills? Or your
 students want to team up to write an app? Or you have a group of
 workers located all over the globe? Or... or...
 
 Jacqueline Landman Gay | jac...@hyperactivesw.com
 HyperActive Software   | http://www.hyperactivesw.com
 
 
 
 ___
 use-livecode mailing list
 use-livecode@lists.runrev.com
 Please visit this url to subscribe, unsubscribe and manage your
 subscription preferences:
 http://lists.runrev.com/mailman/listinfo/use-livecode
>>> 
>>> 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your 
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Any message sent to popup menu (btn) when nothing is selected?

2016-04-12 Thread Tore Nilsen
When you do not select an item in the menu, pItemName is empty. If you set up a 
condition where the switch statement kicks in if pItemName is not empty, then 
you will get the result you wanted, also if the user leaves the menu without 
making any choice.

Here is a script that demonstartes this:

on menuPick pItemName
   if pItemName is not empty then 
  answer pItemName
   else
  answer "You did not select anything"
   end if
end menuPick

Regards Tore



> 12. apr. 2016 kl. 18.51 skrev Paul Dupuis :
> 
> I have a user interface problem. A popup menu (a button) is presented.
> The button has a number of menu items, some dividers between items, etc.
> It has a menuPick handler that covers all the items in the menu
> explicitly and a default handler at the end (just for good measure).
> 
> I want to take some action IF a user pops up the popup menu, but does
> NOT select any menu item (so presses escape or clicks on a non-active
> item like a menu divider or just click elsewhere so the popup is dismissed)
> 
> The problem is, there appears to be NO message sent to the button of a
> popup menu if NO active menu item is selected. The "default" switch
> statement option never happens because a menuPick is never sent.
> menuPick only get send when an active menu item is selected.
> 
> A closeControl to the button when the popup menu is dismissed WOULD have
> been another logical possibility but closeControl is only sent to groups
> (according to the dictionary)
> 
> Has any one else ever needed to take an action if a menu item is NOT
> selected from a popup menu? Does anyone have any ideas on how this may
> be handled? Should a message be sent to a popup menu button when the
> popup menu is dismissed without a menuPick?
> 
> If no message exists, should one? Should popup menus send a closeControl
> to their button of dismissed without a menuPick? Should this be an
> enhancement request for LiveCode version 1,936 (or earlier)? Why do I
> run into these weird things?
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Any message sent to popup menu (btn) when nothing is selected?

2016-04-12 Thread Tore Nilsen
In order to catch the user escaping the button without making any choices this 
works:

local lLabel
on mouseDown
   put the label of me into lLabel
end mouseDown
on mouseLeave
   if lLabel is not empty then
  if label of me = lLabel then
 answer "You did not select anything"
 put empty into lLabel
  end if
   end if
end mouseLeave


> 12. apr. 2016 kl. 19.01 skrev Tore Nilsen :
> 
> When you do not select an item in the menu, pItemName is empty. If you set up 
> a condition where the switch statement kicks in if pItemName is not empty, 
> then you will get the result you wanted, also if the user leaves the menu 
> without making any choice.
> 
> Here is a script that demonstartes this:
> 
> on menuPick pItemName
>   if pItemName is not empty then 
>  answer pItemName
>   else
>  answer "You did not select anything"
>   end if
> end menuPick
> 
> Regards Tore
> 
> 
> 
>> 12. apr. 2016 kl. 18.51 skrev Paul Dupuis :
>> 
>> I have a user interface problem. A popup menu (a button) is presented.
>> The button has a number of menu items, some dividers between items, etc.
>> It has a menuPick handler that covers all the items in the menu
>> explicitly and a default handler at the end (just for good measure).
>> 
>> I want to take some action IF a user pops up the popup menu, but does
>> NOT select any menu item (so presses escape or clicks on a non-active
>> item like a menu divider or just click elsewhere so the popup is dismissed)
>> 
>> The problem is, there appears to be NO message sent to the button of a
>> popup menu if NO active menu item is selected. The "default" switch
>> statement option never happens because a menuPick is never sent.
>> menuPick only get send when an active menu item is selected.
>> 
>> A closeControl to the button when the popup menu is dismissed WOULD have
>> been another logical possibility but closeControl is only sent to groups
>> (according to the dictionary)
>> 
>> Has any one else ever needed to take an action if a menu item is NOT
>> selected from a popup menu? Does anyone have any ideas on how this may
>> be handled? Should a message be sent to a popup menu button when the
>> popup menu is dismissed without a menuPick?
>> 
>> If no message exists, should one? Should popup menus send a closeControl
>> to their button of dismissed without a menuPick? Should this be an
>> enhancement request for LiveCode version 1,936 (or earlier)? Why do I
>> run into these weird things?
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Any message sent to popup menu (btn) when nothing is selected?

2016-04-12 Thread Tore Nilsen
I did not think of the mouseRelease handler, but it is much simpler and better 
than my solution. You would still ned the if-statement in the menuPick handler 
to get any clicks on the divider lines, as they will count as a menuPick with 
the pItemName being empty.

Tore
> 12. apr. 2016 kl. 20.48 skrev Mike Bonner :
> 
> You can use the "mouserelease" message for this.
> 
> This script in the popup works in both 7 and 8.Didn't check earlier
> versions.
> 
> on menuPick pItemName
>   put pItemName -- displays what was chosen
> end menuPick
> 
> on mouserelease
>   put "Nothing chosen" -- if nothing was chosen
> end mouserelease
> 
> 
> On Tue, Apr 12, 2016 at 12:36 PM, Tore Nilsen  wrote:
> 
>> In order to catch the user escaping the button without making any choices
>> this works:
>> 
>> local lLabel
>> on mouseDown
>>   put the label of me into lLabel
>> end mouseDown
>> on mouseLeave
>>   if lLabel is not empty then
>>  if label of me = lLabel then
>> answer "You did not select anything"
>> put empty into lLabel
>>  end if
>>   end if
>> end mouseLeave
>> 
>> 
>>> 12. apr. 2016 kl. 19.01 skrev Tore Nilsen :
>>> 
>>> When you do not select an item in the menu, pItemName is empty. If you
>> set up a condition where the switch statement kicks in if pItemName is not
>> empty, then you will get the result you wanted, also if the user leaves the
>> menu without making any choice.
>>> 
>>> Here is a script that demonstartes this:
>>> 
>>> on menuPick pItemName
>>>  if pItemName is not empty then
>>> answer pItemName
>>>  else
>>> answer "You did not select anything"
>>>  end if
>>> end menuPick
>>> 
>>> Regards Tore
>>> 
>>> 
>>> 
>>>> 12. apr. 2016 kl. 18.51 skrev Paul Dupuis :
>>>> 
>>>> I have a user interface problem. A popup menu (a button) is presented.
>>>> The button has a number of menu items, some dividers between items, etc.
>>>> It has a menuPick handler that covers all the items in the menu
>>>> explicitly and a default handler at the end (just for good measure).
>>>> 
>>>> I want to take some action IF a user pops up the popup menu, but does
>>>> NOT select any menu item (so presses escape or clicks on a non-active
>>>> item like a menu divider or just click elsewhere so the popup is
>> dismissed)
>>>> 
>>>> The problem is, there appears to be NO message sent to the button of a
>>>> popup menu if NO active menu item is selected. The "default" switch
>>>> statement option never happens because a menuPick is never sent.
>>>> menuPick only get send when an active menu item is selected.
>>>> 
>>>> A closeControl to the button when the popup menu is dismissed WOULD have
>>>> been another logical possibility but closeControl is only sent to groups
>>>> (according to the dictionary)
>>>> 
>>>> Has any one else ever needed to take an action if a menu item is NOT
>>>> selected from a popup menu? Does anyone have any ideas on how this may
>>>> be handled? Should a message be sent to a popup menu button when the
>>>> popup menu is dismissed without a menuPick?
>>>> 
>>>> If no message exists, should one? Should popup menus send a closeControl
>>>> to their button of dismissed without a menuPick? Should this be an
>>>> enhancement request for LiveCode version 1,936 (or earlier)? Why do I
>>>> run into these weird things?
>>>> 
>>>> 
>>>> ___
>>>> use-livecode mailing list
>>>> use-livecode@lists.runrev.com
>>>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>> 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Any message sent to popup menu (btn) when nothing is selected?

2016-04-12 Thread Tore Nilsen
If you click on a dividerLine in a popUp menu, the menuPick message fire, but 
with pItemName being empty. You can see this happen if you try:

on menuPick pItemName
answer pItemName
end menuPick

This will give you an empty dialog. At least this is what happens in LC 7.1.1

Tore


> 12. apr. 2016 kl. 21.36 skrev J. Landman Gay :
> 
> The menupick message doesn't fire at all when no selection is made from a 
> popup button, but you do get a mouseLeave message. It might be possible to 
> track a local script variable to catch when that happens. This may need some 
> tweaking:
> 
> local sMenuItem
> 
> on menuPick pItemName
>  put pItemName into sMenuItem
>  switch pItemName
>case "choice 1"
>  put "case 1"
>  break
>case "choice 2"
>  put "case 2"
>  break
>default
>  end switch
> end menuPick
> 
> on mouseLeave
>  if sMenuItem = "" then
>doDefaultStuff
>  end if
>  put "" into sMenuItem
> end mouseLeave
> 
> on doDefaultStuff
>  put the seconds
> end doDefaultStuff
> 
> 
> On 4/12/2016 12:01 PM, Tore Nilsen wrote:
>> When you do not select an item in the menu, pItemName is empty. If you set 
>> up a condition where the switch statement kicks in if pItemName is not 
>> empty, then you will get the result you wanted, also if the user leaves the 
>> menu without making any choice.
>> 
>> Here is a script that demonstartes this:
>> 
>> on menuPick pItemName
>>if pItemName is not empty then
>>   answer pItemName
>>else
>>   answer "You did not select anything"
>>end if
>> end menuPick
>> 
>> Regards Tore
>> 
>> 
>> 
>>> 12. apr. 2016 kl. 18.51 skrev Paul Dupuis :
>>> 
>>> I have a user interface problem. A popup menu (a button) is presented.
>>> The button has a number of menu items, some dividers between items, etc.
>>> It has a menuPick handler that covers all the items in the menu
>>> explicitly and a default handler at the end (just for good measure).
>>> 
>>> I want to take some action IF a user pops up the popup menu, but does
>>> NOT select any menu item (so presses escape or clicks on a non-active
>>> item like a menu divider or just click elsewhere so the popup is dismissed)
>>> 
>>> The problem is, there appears to be NO message sent to the button of a
>>> popup menu if NO active menu item is selected. The "default" switch
>>> statement option never happens because a menuPick is never sent.
>>> menuPick only get send when an active menu item is selected.
>>> 
>>> A closeControl to the button when the popup menu is dismissed WOULD have
>>> been another logical possibility but closeControl is only sent to groups
>>> (according to the dictionary)
>>> 
>>> Has any one else ever needed to take an action if a menu item is NOT
>>> selected from a popup menu? Does anyone have any ideas on how this may
>>> be handled? Should a message be sent to a popup menu button when the
>>> popup menu is dismissed without a menuPick?
>>> 
>>> If no message exists, should one? Should popup menus send a closeControl
>>> to their button of dismissed without a menuPick? Should this be an
>>> enhancement request for LiveCode version 1,936 (or earlier)? Why do I
>>> run into these weird things?
>>> 
>>> 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your 
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
> 
> 
> -- 
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software   | http://www.hyperactivesw.com
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: 8.0.0 RC 1 Text Properties all gone?

2016-04-19 Thread Tore Nilsen
When I try, I get a list with the options you mentioned. My list is scrollable 
and I find all the font names below the first options. I can assign any font I 
like from the font list.

Tore

Using Mac OSX 10.11.4
> 19. apr. 2016 kl. 19.39 skrev Sannyasin Brahmanathaswami :
> 
> On 4/17/16, 4:28 PM, "use-livecode on behalf of J. Landman Gay" 
>  
> wrote:
> 
> 
>> All your installed fonts should be under the new entries.
> 
> But they don’t
> 
> I think I missed something.. Read through all the posts on this so far.. 
> But  I still don’t see a list of fontNames.
> 
> So how would one assign Helvetica Neue Bold to a label field?
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: 7.1.4 RC1 on OS X gets scanned every opening

2016-04-19 Thread Tore Nilsen
Happens frequently with LC 7.1.3 and LC 8.0 RC also.

Using Mac OSX 10.11.4


Tore
> 19. apr. 2016 kl. 21.40 skrev Dr. Hawkins :
> 
> As many times as I open 7.1.4 RC1, it always gets scanned again like a new
> program.
> 
> Are other people seeing this, or is something funny happening?
> 
> -- 
> Dr. Richard E. Hawkins, Esq.
> (702) 508-8462
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Sound and video on Windows - help needed urgently

2016-05-13 Thread Tore Nilsen
I have a group of students up for national exams in computer science in late 
May. In Norway, high school students bring their own computers to the classroom 
and to their exams. One of my students has a PC with Windows 10 installed. She 
reports that she is unable to use the player object on her computer. 

We do not know what tasks they will have to do for their exams until the day of 
the exam, but previous exams have always contained one task where students are 
asked to incorporate sound or video in their application. In previous exams 
this task will have the students prepare a media file (sound or video) and use 
it for different purposes like a background track for a slide-show, a popUp 
window to show videos or as a timed soundtrack for an animation.

In situations where the player object may be visible, we can always use a 
browser-widget to complete the task. However, in situations where the end user 
should not be able to control the player object directly, or where the player 
object for other reasons needs to be invisible, this is not a solution for this 
particular student. 

Does anyone know if setting the dontuseQT to true will help? If not, are there 
any other option we can try? Or should we start transferring all her previous 
work, alongside LiveCode to one of our schools older laptops, in order to have 
her up and running in good time before her exam?

Regards

Tore Nilsen
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Infinite LiveCode - Message from CEO

2016-05-13 Thread Tore Nilsen
I thought they both got it from Agnes

Tore


> 14. mai 2016 kl. 01.06 skrev Bob Sneidar :
> 
> 
>> On May 13, 2016, at 16:05 , Bob Sneidar  wrote:
>> 
>> Well you know, there are lies... and then there are damnable lies... and 
>> then there are detestably damnable lies...
>> 
>> And then there are statistics!
>> 
>> (roughly a quote of Mark Twain)
>> 
> 
> Who I just discovered got it from British Prime Minister Benjamin Disraeli.
> 
> Bob S
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: LC 8 is great but

2016-05-16 Thread Tore Nilsen
Instead of using specialFolderPath(“documents”) you could also use 
“specialFolderPath(“resources”). This will put your files in the same folder as 
your stack when developing, and in the engine folder when deploying the app. 
Remember to include the folder when you set the app up for deployment.

Regards
Tore Nilsen


> 16. mai 2016 kl. 17.46 skrev Alain Vezina :
> 
> Hi all,
> 
> There are great things in LC 8, especially the widget browser.
> 
> But I don’t understand why some capabilities are not yet in LC engine.
> Why we can’t make a copy - paste in a text field in iOS and Android (using 
> the clipboardData).
> LC team promises it since 2012.
> 
> I develop apps for helping people in French spelling and grammar and I do 
> need copy and paste in text field.
> 
> In iOS, I found a way to solve that problem: I replace some text fields by 
> HTML pages I build in my program. But it is not possible to do the same in 
> Android device because the place where you can write is in the 
> specialFolderPath("documents"), but the HTML page you create must be in 
> engine to be accessible by the browser.
> 
> So I can’t transfer my apps on Android devices.
> 
> Anybody has an idea to bypass that limitation of LC?
> 
> Alain Vézina
> Logilangue
> www.logilangue.com
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: tree view widget

2016-05-17 Thread Tore Nilsen
Apart from the wrong chars for quotes around the last values of temp, and the 
lack of a closing quote on the same line, I can see nothing wrong with the 
script. It works here. 

Regards 
Tore Nilsen


> 17. mai 2016 kl. 21.12 skrev Yves COPPE :
> 
> Hi,
> 
> here is a sample of script (doesn’t work)
> 
> 
> on mouseUp
> 
> put "Dog,Cat,Horse" into temp
> 
> repeat with i = 1 to the number of items of temp
> 
> put item i of temp into tHobby["John","Animal",i]
> 
> end repeat
> 
> 
> put "Dog,Tortoise" into temp
> 
> repeat with i = 1 to the number of items of temp
> 
> put item i of temp into tHobby["Jane","Animal",i]
> 
> end repeat
> 
> 
> put  « Football Swimming  into temp
> 
> repeat with i = 1 to the number of items of temp
> 
> put item i of temp into tHobby["Willy","Sport",i]
> 
> end repeat
> 
> set the arraydata of widget "MyTreeView" to tHobby
> 
> end mouseUp
> 
>> Le 17 mai 2016 à 10:48, Ali Lloyd  a écrit :
>> 
>> That should work, yes! Could you post more than just the one-line snippet?
>> That way me might be able to see what is going wrong.
>> 
>> On Mon, May 16, 2016 at 9:23 PM Yves COPPE  wrote:
>> 
>>> Hi list,
>>> 
>>> Let say I have an array  two dimensional created in a script
>>> this array has a name : MyContents
>>> 
>>> 
>>> How can i set the arrayData to the tree widget ?
>>> 
>>> set the arrayData of widget  « X »  to MyContents ??   doesn’t work ...
>>> 
>>> Thanks
>>> 
>>> Greetings.
>>> 
>>>> Le 16 mai 2016 à 17:41, Ali Lloyd  a écrit :
>>>> 
>>>> There were several fixes applied to the custom properties editor which is
>>>> very similar-it appears we (I) forgot to also apply them to the array
>>>> editor. This is very easily rectified. Sorry for any inconvenience.
>>>> 
>>>> On Sun, May 15, 2016 at 9:30 PM Dave Kilroy >>> 
>>>> wrote:
>>>> 
>>>>> Talk about buggy - my last posting had so many typos I'm doing it again:
>>>>> 
>>>>> --
>>>>> 
>>>>> Yeah that inspector is buggy.
>>>>> 
>>>>> I think the  'Key:' and 'Value:' properties are only for when you are
>>> using
>>>>> the inspector to add or update elements to it
>>>>> 
>>>>> If you click the "+ Add new element" button at the top of the
>>> 'Arraydata'
>>>>> property field, then highlight the new key in the 'Arraydata' field,
>>> then
>>>>> click in the 'Value:' field and write something followed by pressing the
>>>>> tab
>>>>> or return key then the value will appear in 'Arraydata'.
>>>>> 
>>>>> But quite a lot of the time the 'Key:' field is of no use (the hilited
>>> key
>>>>> in the 'Arraydata' field always seems to over-ride anything in the
>>> 'Key:'
>>>>> field). And the inspector seems to be unable to accept data for
>>>>> multi-dimensional arrays.
>>>>> 
>>>>> Much easier to use script to populate the widget's arrayData property.
>>>>> 
>>>>> One other thing to note is that the hilitedElement returns the key with
>>> a
>>>>> trailing comma so in script I have to do something like:
>>>>> 
>>>>>  put the hilitedElement of me into tKey
>>>>>  if char -1 of tKey is comma then delete char -1 of tKey
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> -
>>>>> "The first 90% of the task takes 90% of the time, and the last 10% takes
>>>>> the other 90% of the time."
>>>>> Peter M. Brigham
>>>>> --
>>>>> View this message in context:
>>>>> 
>>> http://runtime-revolution.278305.n4.nabble.com/tree-view-widget-tp4704705p4704712.html
>>>>> Sent from the Revolution - User mailing list archive at Nabble.com.
>>>>> 
>>>>> ___
>>>>> use-livecode mailing list
>>>>> use-livecode@lists.runrev.com
>>>>> Please visit this url to subscribe, unsubscribe and manage your
>>>&

Slightly OT: Exam results for students using LiveCode in Norway

2016-06-18 Thread Tore Nilsen
The results from national and local exams in the subject “Information 
technology” in Norwegian Upper Secondary schools are now in. I am happy to say 
that my students scored well in their exams, with an average of 4.4 out of 6 
for all students who had to either sit through the national written exam or the 
local oral/practical exam assessed by external teacher. 

60% of the students scored 5 or better, which puts them at the top of the 
scale. Compared to last years national results, the overall average would put 
our school at a fine top 6 spot nationally. With a top 5 spot for the national 
written exam and a top 6 spot for the oral/practical exam.

These results are unprecedented at our school, and in my opinion, very much a 
result of our choice to use LiveCode as our programming environment. Due to the 
nature of LiveCode we have been able to focus on the principles behind good 
coding, and use both time and resources to become better at problem solving 
rather than to learn the intricacies of a specialised programming language. As 
far as I know, we are the only school in Norway to use LiveCode as the 
preferred tool in this subject.

On behalf of my students, I am very happy with the results, and I very much 
look forward to teach programming with LiveCode to yet another group of 
students next year. 

Regards
Tore Nilsen
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Slightly OT: Exam results for students using LiveCode in Norway

2016-06-18 Thread Tore Nilsen
Luckily we enjoy a fair degree of freedom, as long as we can reach the 
competence aims in the national curriculum.

Tore

> 18. jun. 2016 kl. 20.03 skrev Richmond :
> 
> I only wish I could persuade the Ministry of Education of that in Bulgaria 
> (here schools have almost no individual curricular control).
> 
> Very good news indeed: Bravo!
> 
> Richmond Mathewson.
> 
> On 18.06.2016 20:17, Tore Nilsen wrote:
>> The results from national and local exams in the subject “Information 
>> technology” in Norwegian Upper Secondary schools are now in. I am happy to 
>> say that my students scored well in their exams, with an average of 4.4 out 
>> of 6 for all students who had to either sit through the national written 
>> exam or the local oral/practical exam assessed by external teacher.
>> 
>> 60% of the students scored 5 or better, which puts them at the top of the 
>> scale. Compared to last years national results, the overall average would 
>> put our school at a fine top 6 spot nationally. With a top 5 spot for the 
>> national written exam and a top 6 spot for the oral/practical exam.
>> 
>> These results are unprecedented at our school, and in my opinion, very much 
>> a result of our choice to use LiveCode as our programming environment.
> 
> The next sentence says exactly what is so good about Livecode from a 
> pedagogical point of view.
> 
>>  Due to the nature of LiveCode we have been able to focus on the principles 
>> behind good coding, and use both time and resources to become better at 
>> problem solving rather than to learn the intricacies of a specialised 
>> programming language.
> 
> 
>> As far as I know, we are the only school in Norway to use LiveCode as the 
>> preferred tool in this subject.
>> 
>> On behalf of my students, I am very happy with the results, and I very much 
>> look forward to teach programming with LiveCode to yet another group of 
>> students next year.
>> 
>> Regards
>> Tore Nilsen
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Slightly OT: Exam results for students using LiveCode in Norway

2016-06-18 Thread Tore Nilsen
Here in Norway we do not have a common textbook, although we do have national 
exams. We have been using LiveCode for the past two years without any textbook 
at all. I am in the process of writing my own textbook on how to use LiveCode 
and adapt it to the national curriculum, and hopefully it will be completed by 
mid August. The first version will be an iBooks version, as we have a set of 
iPads that I can use for my class. The plan is to adapt this textbook into an 
application, using LiveCode of course, but for the moment I need to concentrate 
on the content. In order to get the level of usability I want in time for next 
school year, I find that using iBooks Author is the best tool for now.

Tore

 
> 18. jun. 2016 kl. 20.17 skrev Kevin Miller :
> 
> This is great news Tore. We have seen similarly good results here in 
> Scotland. 
> 
> Richmond, it can be done. LC has become something of a standard here in, it 
> is in the main textbook and exams. 
> 
> Sent from my iPhone
> 
>> On 18 Jun 2016, at 19:03, Richmond  wrote:
>> 
>> I only wish I could persuade the Ministry of Education of that in Bulgaria 
>> (here schools have almost no individual curricular control).
>> 
>> Very good news indeed: Bravo!
>> 
>> Richmond Mathewson.
>> 
>>> On 18.06.2016 20:17, Tore Nilsen wrote:
>>> The results from national and local exams in the subject “Information 
>>> technology” in Norwegian Upper Secondary schools are now in. I am happy to 
>>> say that my students scored well in their exams, with an average of 4.4 out 
>>> of 6 for all students who had to either sit through the national written 
>>> exam or the local oral/practical exam assessed by external teacher.
>>> 
>>> 60% of the students scored 5 or better, which puts them at the top of the 
>>> scale. Compared to last years national results, the overall average would 
>>> put our school at a fine top 6 spot nationally. With a top 5 spot for the 
>>> national written exam and a top 6 spot for the oral/practical exam.
>>> 
>>> These results are unprecedented at our school, and in my opinion, very much 
>>> a result of our choice to use LiveCode as our programming environment.
>> 
>> The next sentence says exactly what is so good about Livecode from a 
>> pedagogical point of view.
>> 
>>> Due to the nature of LiveCode we have been able to focus on the principles 
>>> behind good coding, and use both time and resources to become better at 
>>> problem solving rather than to learn the intricacies of a specialised 
>>> programming language.
>> 
>> 
>>> As far as I know, we are the only school in Norway to use LiveCode as the 
>>> preferred tool in this subject.
>>> 
>>> On behalf of my students, I am very happy with the results, and I very much 
>>> look forward to teach programming with LiveCode to yet another group of 
>>> students next year.
>>> 
>>> Regards
>>> Tore Nilsen
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your 
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Slight annoyance from MacKiev

2016-06-19 Thread Tore Nilsen
From what I can see on their website, it is not HyperStudio, but a new product 
called HyperStudio Author that produces HTML 5 files in the form of widgets for 
iBooks, which also can be viewed in a browser, much like what you can do with 
Hype or iAD Producer. I guess it is a limited subset of HyperStudio and I would 
be surprised if it could work with an external database.

Tore
> 19. jun. 2016 kl. 21.02 skrev Rick Harrison :
> 
> Does HTML5 under HyperStudio Author work with external databases?
> If so, it would outclass our LC version now.
> 
> Thanks,
> 
> Rick
> 
>> On Jun 19, 2016, at 2:38 PM, Colin Holgate  wrote:
>> 
>> sm is Service Mark.
>> 
>> I tried a test, and if the LC HTML5 page is loaded and running on iPad, you 
>> can go into airplane mode and the page will still work. But, if you quit 
>> Safari and reopen it, the page won’t load.
>> 
>> 
>>> On Jun 19, 2016, at 2:19 PM, Richmond  wrote:
>>> 
>>> Um: http://www.mackiev.com/hsa/
>>> 
>>> states:
>>> 
>>> "Export your HyperStudio projects as HTML5 Web apps that
>>> can be run offline and be delivered to iPads and iPhones
>>> without going through the App Store℠."
>>> 
>>> [ Hmm; does superscripted 'SM' mean 'sado-masochist? ]
>>> 
>>> 1. Is that claim true (offline running)?
>>> 
>>> 2. Is that also true of Livecode's HTML5 exports?
>>> 
>>> Richmond.
>>> 
>>> 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your 
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Move to the points.

2016-06-26 Thread Tore Nilsen
Both move and wait commands are blocking commands. Now messages are acted upon 
when the code runs. If you would like several things happen at the same time 
you would need to use “send to me in time” where you then would have to check 
current position and set the new position based on this. You could then change 
icons based upon the location of the object you move.

An easier way would be to make the path with series of individual graphics, and 
set icons depending on which graphic you currently  use as path. This may work 
better if this is something you would like your students to try.

Tore


> 26. jun. 2016 kl. 17.30 skrev Richmond :
> 
> It is very easy to draw and/or generate a *multi-point vector path* on a stack
> and then *animate* a control to move along it like this:
> 
> *move* the *btn* "button" to the points of the *graphic* "wiggle" in 30 secs
> 
> but is looks, frankly, bl**dy silly except in the most trivial of instances.
> 
> So I had the "daft" idea of using either:
> 
> a button with a rapidly changing *icon*,
> 
> or
> 
> a graphic object with a rapidly changing *backPattern*
> 
> to give the illusion of *animation* in a way that is, at least, a bit less 
> silly.
> 
> HOWEVER  . . .
> 
> It seems that commands such as
> 
> move the btn "button" to the points of the graphic "wiggle" in 30 secs
> 
> are very difficult to*interrupt* with*animation sequences* such as this:
> 
> set the icon of btn "button" to the id of img "prawn1"
>   wait 3 ticks
> set the icon of btn "button" to the id of img "prawn2"
>   wait 3 ticks
> set the icon of btn "button" to the id of img "prawn3"
>   wait 3 ticks
> set the icon of btn "button" to the id of img "prawn4"
>   wait 3 ticks
> 
> AND, in an*ideal situation* that sort of sequence of commands should NOT 
> interrupt
> the move command but run *concurrently*.
> 
> Richmond.
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Vertical progress bar

2016-06-28 Thread Tore Nilsen
It is even easier, just make the height of the bounding rectangle higher than 
the width and you will have a vertical progress bar.

Tore
> 28. jun. 2016 kl. 18.50 skrev rjd318 :
> 
> Hi all - I guess it's not as easy as rotating the existing progress bar 
> control? Anyone know of a pre-existing technique to do this?
> 
> - Jose 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Vertical progress bar

2016-06-28 Thread Tore Nilsen
I cannot remember when, but I guess it was pure and simple logic. All controls 
have a bounding rect, and if this bounding rect is higher than its width then… 
:-)

Tore


> 28. jun. 2016 kl. 19.26 skrev Dar Scott :
> 
> Wow!  That is cool!  How did you even discover this?  
> 
>> On Jun 28, 2016, at 10:55 AM, Tore Nilsen  wrote:
>> 
>> It is even easier, just make the height of the bounding rectangle higher 
>> than the width and you will have a vertical progress bar.
>> 
>> Tore
>>> 28. jun. 2016 kl. 18.50 skrev rjd318 :
>>> 
>>> Hi all - I guess it's not as easy as rotating the existing progress bar 
>>> control? Anyone know of a pre-existing technique to do this?
>>> 
>>> - Jose 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your 
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Vertical progress bar

2016-06-28 Thread Tore Nilsen
If the rect is square the scrollbar/progressbar will be vertical.

Tore
> 28. jun. 2016 kl. 19.34 skrev Mark Wieder :
> 
> Dar Scott  writes:
> 
>> 
>> Wow!  That is cool!  How did you even discover this?  
> 
> Progressbars are a subclass of scrollbars.
> You can have horizontal and vertical scrollbars.
> The rect determines which.
> (not sure what happens with squares)
> 
> -- 
> Mark Wieder
> ahsoftw...@gmail.com
> 
> 
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Stopping a script

2016-06-28 Thread Tore Nilsen
I am not quite sure I understand what you are trying to do , but I’ll have a go 
at it:

/*This is what I would put into the cardscript*/

local sMoveLine,sMoveSteps,sMove

on openCard

put field "moveSpots" into sMoveSteps --put the coordinates into a variable for 
faster execution of script

put 0 into sMoveLine -- initialising the steps

put "false" into sMove -- initialising a variable to control movement

end openCard


/*This would go into the script of the object that should be moved*/

on mouseEnter

put not sMove into sMove -- change the movement control to true

add 1 to sMoveLine -- get the next set of coordinates

send moveFigure to me in x milliseconds --starts/stops the movement

end mouseEnter


on moveFigure

if sMove is true then

put line sMoveLine of sMoveSteps into tNewLoc -- finds the new location

move me to tNewLoc in y seconds -- moves to the new location in specified time

end if

send moveFigure to me in x milliseconds --starts/stops the movement

end moveFigure


on mouseLeave

put "false" into sMove

end mouseLeave


Regards Tore



> 28. jun. 2016 kl. 21.05 skrev d...@swcp.com:
> 
> correction:  the walking figure used 'send' not 'move'
> 
>> On Jun 28, 2016, at 12:59 PM, Dar Scott  wrote:
>> 
>> Maybe this is a good time to introduce the event style of programming.  
>> 
>> Focus on 'move...without waiting', and 'moveStopped' and maybe 'send'.  
>> 
>> Well, if the details allow that.  If using moveStopped makes things jerky, 
>> then you might need to do something else.  However, I think my grandson made 
>> a walking stick figure doing this.  
>> 
>> When you stop, not only stop moving but also set a flag so moveStopped does 
>> not start the next motion.  
>> 
>> 
>>> On Jun 28, 2016, at 12:32 PM, Richmond  wrote:
>>> 
>>> I have a *button* which, when I click on it, sends a *graphic object* off 
>>> on a mad journey all over
>>> a *card* based on reading positions from a*listField*.
>>> 
>>> I have tried *STOP MOVING* to interrupt that script, but that does *NOT* 
>>> work
>>> because the graphic is executing a large number of very short movements in 
>>> a cycling
>>> *REPEAT UNTIL* structure.
>>> 
>>> Ideally (Ho, Ho, Ho.) I should like to be able to have something like this:
>>> 
>>> the mad movement script starts executing when triggered by a *mouseEnter* 
>>> script
>>> in the *graphic object* that moves,
>>> 
>>> and
>>> 
>>> some sort of *STOP SCRIPT* in a *mouseLeave* script in the same *graphic 
>>> object*.
>>> 
>>> Now, I know that sounds a bit *bonkers*, but I am writing this on behalf of 
>>> a very bright chap
>>> who is attending my Summer classes, and I do understand what he is trying 
>>> to achieve.
>>> 
>>> Richmond.
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your 
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Stopping a script

2016-06-28 Thread Tore Nilsen
The variables needs to be global rather than local if the scripts are to be 
placed in both the card script and the script of the figure that should be 
moved. The first line of the card script and the first line of the script in 
the object should then read:

global sMoveLine,sMoveSteps,sMove 

Tore

> 28. jun. 2016 kl. 21.40 skrev Tore Nilsen :
> 
> I am not quite sure I understand what you are trying to do , but I’ll have a 
> go at it:
> 
> /*This is what I would put into the cardscript*/
> 
> local sMoveLine,sMoveSteps,sMove
> 
> on openCard
> 
> put field "moveSpots" into sMoveSteps --put the coordinates into a variable 
> for faster execution of script
> 
> put 0 into sMoveLine -- initialising the steps
> 
> put "false" into sMove -- initialising a variable to control movement
> 
> end openCard
> 
> 
> /*This would go into the script of the object that should be moved*/
> 
> on mouseEnter
> 
> put not sMove into sMove -- change the movement control to true
> 
> add 1 to sMoveLine -- get the next set of coordinates
> 
> send moveFigure to me in x milliseconds --starts/stops the movement
> 
> end mouseEnter
> 
> 
> on moveFigure
> 
> if sMove is true then
> 
> put line sMoveLine of sMoveSteps into tNewLoc -- finds the new location
> 
> move me to tNewLoc in y seconds -- moves to the new location in specified time
> 
> end if
> 
> send moveFigure to me in x milliseconds --starts/stops the movement
> 
> end moveFigure
> 
> 
> on mouseLeave
> 
> put "false" into sMove
> 
> end mouseLeave
> 
> 
> Regards Tore
> 
> 
> 
>> 28. jun. 2016 kl. 21.05 skrev d...@swcp.com:
>> 
>> correction:  the walking figure used 'send' not 'move'
>> 
>>> On Jun 28, 2016, at 12:59 PM, Dar Scott  wrote:
>>> 
>>> Maybe this is a good time to introduce the event style of programming.  
>>> 
>>> Focus on 'move...without waiting', and 'moveStopped' and maybe 'send'.  
>>> 
>>> Well, if the details allow that.  If using moveStopped makes things jerky, 
>>> then you might need to do something else.  However, I think my grandson 
>>> made a walking stick figure doing this.  
>>> 
>>> When you stop, not only stop moving but also set a flag so moveStopped does 
>>> not start the next motion.  
>>> 
>>> 
>>>> On Jun 28, 2016, at 12:32 PM, Richmond  wrote:
>>>> 
>>>> I have a *button* which, when I click on it, sends a *graphic object* off 
>>>> on a mad journey all over
>>>> a *card* based on reading positions from a*listField*.
>>>> 
>>>> I have tried *STOP MOVING* to interrupt that script, but that does *NOT* 
>>>> work
>>>> because the graphic is executing a large number of very short movements in 
>>>> a cycling
>>>> *REPEAT UNTIL* structure.
>>>> 
>>>> Ideally (Ho, Ho, Ho.) I should like to be able to have something like this:
>>>> 
>>>> the mad movement script starts executing when triggered by a *mouseEnter* 
>>>> script
>>>> in the *graphic object* that moves,
>>>> 
>>>> and
>>>> 
>>>> some sort of *STOP SCRIPT* in a *mouseLeave* script in the same *graphic 
>>>> object*.
>>>> 
>>>> Now, I know that sounds a bit *bonkers*, but I am writing this on behalf 
>>>> of a very bright chap
>>>> who is attending my Summer classes, and I do understand what he is trying 
>>>> to achieve.
>>>> 
>>>> Richmond.
>>>> ___
>>>> use-livecode mailing list
>>>> use-livecode@lists.runrev.com
>>>> Please visit this url to subscribe, unsubscribe and manage your 
>>>> subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>> 
>>> 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your 
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Stopping a script

2016-06-28 Thread Tore Nilsen
Agreed. The send moveFigure to me in the moveFigure handler could be removed if 
you only want the figure to move once each time the mouse enters the object.

I handed my students a stack with a similar script where a button would jump to 
a new loc each time the tried to press it. (The loc was randomly chosen though)
They had to figure out how to stop this from happening, without deleting any of 
the code I had written.


Tore
> 28. jun. 2016 kl. 21.49 skrev Dar Scott :
> 
> This could end up with several copies of moveFigure in pending messages.  
> Don't resend if the flag is false.  Or, cancel the message.  
> 
> (And you might be able to do this with moveStopped instead of send.)
> 
>> On Jun 28, 2016, at 1:45 PM, Tore Nilsen  wrote:
>> 
>> The variables needs to be global rather than local if the scripts are to be 
>> placed in both the card script and the script of the figure that should be 
>> moved. The first line of the card script and the first line of the script in 
>> the object should then read:
>> 
>> global sMoveLine,sMoveSteps,sMove 
>> 
>> Tore
>> 
>>> 28. jun. 2016 kl. 21.40 skrev Tore Nilsen :
>>> 
>>> I am not quite sure I understand what you are trying to do , but I’ll have 
>>> a go at it:
>>> 
>>> /*This is what I would put into the cardscript*/
>>> 
>>> local sMoveLine,sMoveSteps,sMove
>>> 
>>> on openCard
>>> 
>>> put field "moveSpots" into sMoveSteps --put the coordinates into a variable 
>>> for faster execution of script
>>> 
>>> put 0 into sMoveLine -- initialising the steps
>>> 
>>> put "false" into sMove -- initialising a variable to control movement
>>> 
>>> end openCard
>>> 
>>> 
>>> /*This would go into the script of the object that should be moved*/
>>> 
>>> on mouseEnter
>>> 
>>> put not sMove into sMove -- change the movement control to true
>>> 
>>> add 1 to sMoveLine -- get the next set of coordinates
>>> 
>>> send moveFigure to me in x milliseconds --starts/stops the movement
>>> 
>>> end mouseEnter
>>> 
>>> 
>>> on moveFigure
>>> 
>>> if sMove is true then
>>> 
>>> put line sMoveLine of sMoveSteps into tNewLoc -- finds the new location
>>> 
>>> move me to tNewLoc in y seconds -- moves to the new location in specified 
>>> time
>>> 
>>> end if
>>> 
>>> send moveFigure to me in x milliseconds --starts/stops the movement
>>> 
>>> end moveFigure
>>> 
>>> 
>>> on mouseLeave
>>> 
>>> put "false" into sMove
>>> 
>>> end mouseLeave
>>> 
>>> 
>>> Regards Tore
>>> 
>>> 
>>> 
>>>> 28. jun. 2016 kl. 21.05 skrev d...@swcp.com:
>>>> 
>>>> correction:  the walking figure used 'send' not 'move'
>>>> 
>>>>> On Jun 28, 2016, at 12:59 PM, Dar Scott  wrote:
>>>>> 
>>>>> Maybe this is a good time to introduce the event style of programming.  
>>>>> 
>>>>> Focus on 'move...without waiting', and 'moveStopped' and maybe 'send'.  
>>>>> 
>>>>> Well, if the details allow that.  If using moveStopped makes things 
>>>>> jerky, then you might need to do something else.  However, I think my 
>>>>> grandson made a walking stick figure doing this.  
>>>>> 
>>>>> When you stop, not only stop moving but also set a flag so moveStopped 
>>>>> does not start the next motion.  
>>>>> 
>>>>> 
>>>>>> On Jun 28, 2016, at 12:32 PM, Richmond  
>>>>>> wrote:
>>>>>> 
>>>>>> I have a *button* which, when I click on it, sends a *graphic object* 
>>>>>> off on a mad journey all over
>>>>>> a *card* based on reading positions from a*listField*.
>>>>>> 
>>>>>> I have tried *STOP MOVING* to interrupt that script, but that does *NOT* 
>>>>>> work
>>>>>> because the graphic is executing a large number of very short movements 
>>>>>> in a cycling
>>>>>> *REPEAT UNTIL* structure.
>>>>>> 
>>>>>> Ideally (Ho, Ho, Ho.) I should like to be able to have something like 
>>>>>> this:
>>>>

Slack team for educators and students

2016-08-06 Thread Tore Nilsen
As discussed at the conference on Friday 5 August, we need to build a community 
geared towards educators and students using LiveCode. The purpose of such a 
community is to share ideas, techniques, solutions and problems, and to give 
each student and teacher a wider community than what can be provided in the 
classroom. The hope is that both educators and students will find inspiration 
and motivation in being part of an international community, and that such a 
community can be used to put LiveCode in the hands of more teachers and 
students throughout the world. 

I have now set up a Slack team called LiveCode Students for this purpose. At 
the moment the team is invitation only, and I would very much like educators 
who are interested in taking part in such a community to send me a DM. I will 
then invite them to join the team as owners and administrators.

As owners and admins they will be able to set up both public and private 
channels and they can then invite their own students to join the team. All 
students will have access to all public channels and to the private channels 
they may be invited to. Educators will also be given access to a private 
channel called staff_room, where it is possible to have a coffee break and a 
civilised discussion with other educators. 

It is not necessary to teach computing classes full time, anyone who’s work 
include teaching coding with LiveCode is welcome to join. Any other members of 
the LiveCode community who would like to contribute to the education community 
may also send me a DM in order to join the team. Remember that the discussions 
primarily will be related to curricular activities and not LiveCode in general. 

Regards
Tore Nilsen
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: put one array after another

2016-08-10 Thread Tore Nilsen
You could try this, it works if the array is declared global or local, and 
should work if  the arrays are script local if both arrays are constructed 
within the same handler

repeat for each key tKey in tSecondArray

put tSecondArray[tKey] into tFirstArray[tKey]

end repeat


Regards
Tore


> 10. aug. 2016 kl. 18.41 skrev Matt Maier :
> 
> Is there a command to merge two array variables into one?
> 
> Example:
> 
> tFirstArray[tom] = mot
> tFirstArray[jane] = enaj
> 
> tSecondArray[bill] = llib
> tSecondArray[name] = eman
> 
> put tSecondArray after tFirstArray
> 
> tFirstArray[tom] = mot
> tFirstArray[jane] = enaj
> tFirstArray[bill] = llib
> tFirstArray[name] = eman
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: put one array after another

2016-08-10 Thread Tore Nilsen
I don’t think append is a command, it is used when you open files to add new 
data at the end of the file.

 — open file myFilePath for append

Tore
> 10. aug. 2016 kl. 19.05 skrev Matt Maier :
> 
> Thanks Tore, yeah that works. I was just curious if there was a way to do
> it directly. Anytime the syntax is simpler there are fewer chances to make
> a mistake.
> 
> I found "append" in the dictionary but it's not really documented and I
> couldn't get a script to compile with it.
> 
> On Wed, Aug 10, 2016 at 7:51 PM, Tore Nilsen  wrote:
> 
>> You could try this, it works if the array is declared global or local, and
>> should work if  the arrays are script local if both arrays are constructed
>> within the same handler
>> 
>> repeat for each key tKey in tSecondArray
>> 
>> put tSecondArray[tKey] into tFirstArray[tKey]
>> 
>> end repeat
>> 
>> 
>> Regards
>> Tore
>> 
>> 
>>> 10. aug. 2016 kl. 18.41 skrev Matt Maier :
>>> 
>>> Is there a command to merge two array variables into one?
>>> 
>>> Example:
>>> 
>>> tFirstArray[tom] = mot
>>> tFirstArray[jane] = enaj
>>> 
>>> tSecondArray[bill] = llib
>>> tSecondArray[name] = eman
>>> 
>>> put tSecondArray after tFirstArray
>>> 
>>> tFirstArray[tom] = mot
>>> tFirstArray[jane] = enaj
>>> tFirstArray[bill] = llib
>>> tFirstArray[name] = eman
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Very OT - Bad pun

2016-08-25 Thread Tore Nilsen
I guess Gloucestershire is only marginally better?

Tore
> 25. aug. 2016 kl. 17.28 skrev David V Glasgow :
> 
> I use to live in Leicestershire …
> 
> 
>> On 25 Aug 2016, at 4:25 pm, Bob Sneidar  wrote:
>> 
>> Not even the French could pronounce a word so different from how it is 
>> spelled. (I'm half French so I can make fun of us). 
>> 
>> Bob S
>> 
>> 
>>> On Aug 23, 2016, at 14:29 , stephen barncard 
>>>  wrote:
>>> 
>>> On Tue, Aug 23, 2016 at 12:51 PM, Richmond 
>>> wrote:
>>> 
 Well, as most North Americans seem to pronounce "Edinburgh" as "Edinbro" .
 . .
>>> 
>>> 
>>> I pronounced it ED-IN-BURG for years
>>> 
>>> Stephen Barncard - Sebastopol Ca. USA -
>>> mixstream.org
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your 
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Underneath

2016-08-27 Thread Tore Nilsen
Have you tried to set the behavior of these tiles to the script of an invisible 
button, where you reference the object itself with me? 

Tore


> 27. aug. 2016 kl. 21.52 skrev Richmond :
> 
> Thanks to everybody for all sorts of suggestions: I tried all of them, but 
> was unable to get
> any of them to work.
> 
> Here is the finished job: 
> http://forums.livecode.com/viewtopic.php?f=7&t=27837&p=145851#p145851
> 
> Richmond.
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: What's everyone working on this month? (September 2016)

2016-09-02 Thread Tore Nilsen
The academic year has just started here in Norway, and I have just finished a 
preliminary edition of a digital textbook about using LiveCode in the subject 
“Information Technology 2”, for my students. The textbook covers all the 
objectives in the national curriculum with explanations and examples of how to 
use LiveCode in this particular course. The textbook currently has 15 chapters, 
most of them completed, but the final edition will see two or three chapters 
added to the book. I am on a path to have a final version ready by Christmas, 
as an iBook. The plan is to transfer all this stuff into a standalone 
application, built in LiveCode of course, in time for next year. This version 
will have som added benefits, as it will allow me to link directly to 
downloadable example scripts and stacks, that can easily be changed/updated, 
without the need for a complete update of the book.

I am also working on a couple of small applications for my English students. 
One will be a “private dictionary”, where they will add words and phrases they 
come across during their studies, in order to expand their vocabulary. They 
will be able to add words and phrases along with explanations and links to the 
sources where they found the words and/or the explanations of the words.

I am also working on a small “Notes and tasks” application, where they will 
write their own notes from their studies, as well as answers to written or oral 
tasks. This application will let them export their notes or tasks as rtf-files/ 
or sound files and hand in through our LMS as links. I also have plans for a 
third application which will be a collection of phrasal verbs and idioms. I 
guess this will be finished by Christmas and ready for my students in the last 
term. (We have just two terms in the academic year in Norway.

Tore
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: System date

2016-09-06 Thread Tore Nilsen
I have no problem using the system date here in Norway. It works when I use the 
following:

 answer the system date

and when I use:

set the useSystemDate to true
answer the date

In the last example, remember to set the useSystemDate to true every time you 
want to use the system date, as it resets to US date once the handler is 
finished.


Regards 
Tore

 
> 6. sep. 2016 kl. 19.21 skrev Antti Ilola :
> 
> Is it the time to you to get the system date work.I have done everything I
> found your guide, but no avail, every time english date. I made it a bug
> report since version 6 was announced. and still it doesn't work. Now I'm
> using Mac OS 10.10 and 10.11 in Finnish. Today I tired SperCard for fun and
> even it I got finnish date without any larger measures, just "answer the
> date" and that's it. And it is not the only software which understands the
> finnish date, for example Xcode and Xojo knows how it should be display.
> You made many wondrous things into your software, but simple as date won't
> work. I think there are many people in this world who use different date
> form than english.
> 
> Antti
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: "lightening" a color

2016-09-10 Thread Tore Nilsen
Since white in the rgb space is made by adding max value of all three primary 
colours, and getting the colour will give you a list of numerical values in the 
form of 255,0,0 for maximum red, 0,255,0 for maximum green and 0,0,255 for 
maximum blue, you can always change any of these values to produce a paler 
shade.

You can either decrease the value for the primary colour you want but this will 
very soon change the colour to a darker colour, or you can increase the value 
of the other colours. If you increase the value of the other colours, setting 
the different amount of these will give a different colour, not a paler shade 
of the original colour.

If you start out with a maximum red colour (255,0,0) and change the values of 
green and blue to 128 each, you will get a pink colour (255,128,128). The same 
goes for green (128,255,128) and blue (128,128,255). The higher the value of 
the two colours you change, the lighter the overall result.

Regards
Tore



> 11. sep. 2016 kl. 00.00 skrev Dr. Hawkins :
> 
> I am adding the ability to have multiple clients open, and want to use
> colors as a cue.
> 
> Is there a way to "lighten" a color.  That is (I suppose), to grab the
> numeric representation, and convert that to a much paler shade of the color?
> 
> -- 
> Dr. Richard E. Hawkins, Esq.
> (702) 508-8462
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: very often "Scripts externally modified" popup

2016-09-12 Thread Tore Nilsen
One instance in which I have seen this message is if I decide to name/rename a 
stack after I have added script to it. Going to the script editor window after 
renaming and saving triggers this message.

Tore


> 12. sep. 2016 kl. 18.58 skrev J. Landman Gay :
> 
> I've been seeing it too, though not much more often than in LC 7. I still 
> haven't figured out what triggers it and I never use an external editor. If 
> someone could tell us what the algorithm is for determining the warning I 
> could note what I've done right before it happens the next time I see it. 
> It's been an ongoing issue for a while and I've never been able to figure out 
> what makes it happen.
> 
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software   | http://www.hyperactivesw.com
> 
> 
> 
> On September 12, 2016 5:05:42 AM Matthias Rebbe 
>  wrote:
> 
>> Hi,
>> 
>> am i the only one who is noticing the “Scripts externally modified” popup 
>> very very often in LC 8.1RC2 here on Mac OS X 10.11.6?
>> 
>> With the script editor opened switching from LC to an other program and back 
>> to LC opens the popup.
>> 
>> Or within LC switching from the script editor to another window in LC and 
>> back to scripts editor opens that annoying pop again.
>> 
>> This is driving me crazy. So is anyone else noticing this and i should 
>> submit it as a bug or is there something on my side what i can change
>> to ged rid of that popup.
>> 
>> Regards,
>> Matthias Rebbe
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: test color question

2016-09-17 Thread Tore Nilsen
Try this, it works for me:

set the forecolor of char 1 to 10 of line 1 of field 1 to "red"

set the styledText of field 2 to the styledText of line 1 of field 1


Regards
Tore
> 17. sep. 2016 kl. 20.00 skrev jbv :
> 
> Hi list
> 
> Please consider the following lines of script :
> 
>   set the forecolor of char 1 to 10 of line 1 of fld 1 to "red"
>   put line 1 of fld 1 into fld 2
> 
> the text is in fld 2, but the color is gone...
> Is there a way to keep the color (and other style properties) whzn
> moving text between fields, or when sorting lines inside a fld ?
> 
> I know that can be done with HTMLtext (but for what I have to do
> it's much too slow)...
> I have also tried the styledText, but to no avail (things don't
> really happen like explained in the doc)...
> 
> Thanks in advance.
> jbv
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: What's everyone working on this month? (September 2016)

2016-09-19 Thread Tore Nilsen

> 19. sep. 2016 kl. 20.42 skrev William Prothero :
> 
> Tor:
> Since you mention an LMS, I’m wondering if you have successfully implemented 
> an interface to an LMS using LTI or SCORM protocols. Or, more concisely, how 
> do you handle the interface to your LMS?
> Best,
> Bill
> 

I do not handle it very well I am afraid. At our school we use "it’s learning”, 
a Norwegian web based LMS, that is universally hated by anyone who appreciates 
good application design and good user experiences. 

This LMS is so bloated that I do not try to communicate with it at all, other 
than passing a link to the appropriate task, which my students can then use to 
upload their work. When they have completed the task, the application will both 
open the appropriate folder on the students machine, and the page for handing 
in the task in the LMS. They can then drag and drop the task to hand it in. So 
this is very basic and rudimentary, but it works in its own limited way. 

Regards,
Tore


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Japanese (unicode?) text problem

2016-09-20 Thread Tore Nilsen
Internally LiveCode uses UTF-16. You can try to decode your text from UTF-8 
like this:


put url tUrl into tTextToDecode
put textDecode(tTextToDecode,”UTF-8") into field “indices"


regards
Tore




> 21. sep. 2016 kl. 06.30 skrev Nicolas Cueto :
> 
> ​With Notepad++​, created a new file, pasted English and Japanese text, set
> encoding to UTF-8,  then saved as .txt. (Confirmed the file by opening with
> Windows' "Notepad".)
> 
> Next, in LC8.1 ran this button script:
> 
> on mouseUp
>   put empty into field "indices"
>   set the itemdel to quote
>   put item 2 of the long name of this stack into tDataPath
>   set the itemdel to "/"
>   delete the last item of tDataPath
>   put "/Data/bilingual.txt" after tDataPath
>   put "file:" & tDataPath  into tURL
>   put url tURL into field "indices"
> end mouseUp
> 
> The text appears in the field, but with Japanese text garbled.
> 
> What am I doing wrong?
> 
> Thanks.
> 
> --
> Nicolas Cueto
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: copy a stack from dropbox to temp-folder (script)

2016-09-22 Thread Tore Nilsen

My guess is that you need to use binfile instead of file, as a stack is binary.
Vennlig hilsen
Tore Nilsen

Den 21. sep 2016 kl. 23.47 skrev John Allijn  
følgende:

Hi,

I’m trying to copy a file from my dropbox’s public folder to my local
temp-folder.
I get the filename, create a destination path and put the remote file in
the local folder. This seems to work (there is a file by that name in my
temp folder), but when I go to this copied stack I get an “this file is not
a stack”-error.

What am I doing wrong?



here’s my script:

on mouseUp
put “myStack v1.0.0.livecode” into myRemoteFileName

put "https://dl.dropboxusercontent.com/u/14355803/PVT/"&; myRemoteFileName
into myRemoteStackName

put "file:"&specialfolderpath("temporary")&slash into targetFile
revCopyFile myRemoteStackName, targetFile

put specialfolderpath("temporary")&slash& myRemoteFileName into
stackInTempFolder
go to stack stackInTempFolder

put the result

end mouseUp
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Error in mouseUp in SVG widgets

2016-10-02 Thread Tore Nilsen
I think I have come across an error in the SVG icon widget. If the mouse is 
released outside of the widget, the mouseUp handler is trigged even if the user 
has moved the pointer outside of the rect of the widget. The mouseLeave handler 
is correctly triggered before the mouseUp handler fires away. Has anyone else 
come across this. Using LC 8.1.1 (rc1) on MacOS Sierra 10.12.1 (beta). 

Regards
Tore
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Error in mouseUp in SVG widgets

2016-10-02 Thread Tore Nilsen
You are right. I tend to use the svgIcon widget as a replacement for buttons 
with icons, as I like to use color/icon switch as a highlight effect, and I 
find that it is easier to produce persistent design with the widget. I just 
have to check if the mouseLoc is within the rect of the widget to make it work, 
so it is not very complicated to get around.

Tore


> 2. okt. 2016 kl. 20.55 skrev hh :
> 
> Tore N. wrote:
>> I think I have come across an error in the SVG icon widget. If the mouse
>> is released outside of the widget, the mouseUp handler is trigged even if
>> the user has moved the pointer outside of the rect of the widget.
>> The mouseLeave handler is correctly triggered before the mouseUp handler
>> fires away. Has anyone else come across this. Using LC 8.1.1 (rc1) on MacOS
>> Sierra 10.12.1 (beta). 
> 
> Tore, this is probably not a bug but a current 'behaviour' of most widgets,
> see the LiveCode Builder subforum:
> 
> http://forums.livecode.com/viewtopic.php?f=93&t=24369
> http://forums.livecode.com/viewtopic.php?f=93&t=27776
> 
> Hermann
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: [ANN] calendar widget

2016-10-18 Thread Tore Nilsen
Thanks for a fine widget, it works well here on a Mac with  LC 8.1.1 and MacOS 
10.12.1. As a matter of fact, one of my students asked if there was anything 
like this available for LiveCode, just yesterday morning. I can now tell him 
that indeed there is.

> 18. okt. 2016 kl. 23.08 skrev BNig :
> 
> In case someone sees a use case for customizing abbreviated day/month names
> I would reconsider that.


In Norway we often use two letter abbreviations for day names, which is very 
handy if the size of the widget is very small. 

Regards 
Tore Nilsen




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Internet date

2016-10-31 Thread Tore Nilsen
Here is what I get in Norway:

Tue, 1 Nov 2016 07:54:59 +0100


Tore

> 1. nov. 2016 kl. 07.38 skrev J. Landman Gay :
> 
> Is the internet date in a consistent format in every country? That is, except 
> for the spelling of the day and month names, is the format always the same?
> 
> Where I am, it is:  Tue, 1 Nov 2016 01:35:55 -0500
> 
> Geez, where did the year go?
> 
> -- 
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software   | http://www.hyperactivesw.com
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Internet date

2016-11-01 Thread Tore Nilsen
Use systemDate does not apply to the internet date. I got the same result with 
this set to both true and false.

Tore


> 1. nov. 2016 kl. 15.24 skrev Richard Gaskin :
> 
> J. Landman Gay wrote:
> 
> > Is the internet date in a consistent format in every country? That
> > is, except for the spelling of the day and month names, is the format
> > always the same?
> 
> I believe all dates in LC are delivered using US English spellings, except 
> when explicitly directed otherwise by setting the useSystemDate to true.
> 
> With the Internet date, though, the Dictionary notes that it follows RFC 
> 2822, which IIFC only supports US English date element names, so I think it 
> should be unaffected by the useSystemDate.
> 
> If anyone using a non-US English system can double-check the format after 
> setting the useSystemDate to true it would be helpful to confirm that.
> 
> -- 
> Richard Gaskin
> Fourth World Systems
> Software Design and Development for the Desktop, Mobile, and the Web
> 
> ambassa...@fourthworld.comhttp://www.FourthWorld.com
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Internet date

2016-11-01 Thread Tore Nilsen
And I guess that is part of the reasoning for the internet date. You can be 
sure that the information will have a specific format, regardless of any other 
factors that may affect the way the information is formatted. Put the info in a 
variable, extract and format the parts you need to your own liking, and away 
you go.

Tore


> 1. nov. 2016 kl. 15.45 skrev Tore Nilsen :
> 
> Use systemDate does not apply to the internet date. I got the same result 
> with this set to both true and false.
> 
> Tore
> 
> 
>> 1. nov. 2016 kl. 15.24 skrev Richard Gaskin :
>> 
>> J. Landman Gay wrote:
>> 
>>> Is the internet date in a consistent format in every country? That
>>> is, except for the spelling of the day and month names, is the format
>>> always the same?
>> 
>> I believe all dates in LC are delivered using US English spellings, except 
>> when explicitly directed otherwise by setting the useSystemDate to true.
>> 
>> With the Internet date, though, the Dictionary notes that it follows RFC 
>> 2822, which IIFC only supports US English date element names, so I think it 
>> should be unaffected by the useSystemDate.
>> 
>> If anyone using a non-US English system can double-check the format after 
>> setting the useSystemDate to true it would be helpful to confirm that.
>> 
>> -- 
>> Richard Gaskin
>> Fourth World Systems
>> Software Design and Development for the Desktop, Mobile, and the Web
>> 
>> ambassa...@fourthworld.comhttp://www.FourthWorld.com
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: How do you maintain image source reference on multiple platforms?

2016-11-01 Thread Tore Nilsen
You should probably use the specialFolderPath(“resources”) to set the relative 
path to your images. This should work on all systems.

Tore
> 1. nov. 2016 kl. 15.11 skrev Tiemo Hollmann TB :
> 
> Hello,
> 
> 
> 
> after I got the trick on how to handle multiple image sources for  different
> screen resolutions, I began changing all images in my programs from imported
> images to external references. I created on my development platform windows
> a "resource" folder under my development folder, referenced my images to
> that folder, added all image files to the standalone setting "copy files"
> and set the destination folder for the copy files in the standalone setting
> also to a folder "resources". So far, that works fine now.
> 
> 
> 
> On windows I only create the windows standalone. For the final tests,
> adaptions and creating the standalone for Mac OS, I copy the source stack to
> my Mac. Here comes my issue. All of my images have a windows path as source
> reference, like "C:/myPath/recsources/myImage.png", which obviously doesn't
> work on Mac. I tried to set the image source path to a relative path like
> "/resources/myImage.png", hoping that would catch the image on both
> platforms, but obviously relative paths are not working as image source.
> This would be a clean solution for this issue.
> 
> 
> 
> Since the transport of the source stacks is not a one time thing, but can be
> made quite often in the last steps of the project (to always keep the master
> source on my main dev platform windows), it actually can't be it to change
> manually all image paths each time after moving the stack from one platform
> to the other. Do I oversee anything here, or is the only solution to write a
> script, which runs thru all objects and converts the image paths each time I
> transfer my stacks? If yes, has anybody such a small tool? I fear, I am the
> only one, who is developing on two platforms, otherwise this must have come
> up earlier.
> 
> 
> 
> How do you handle this? Any recommendations welcome
> 
> Tiemo
> 
> 
> 
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Internet date

2016-11-01 Thread Tore Nilsen
But you can get the localized week day names: put the system weekdaynames — be 
aware that this sets sunday as the first day of the week no matter where you are


You can get the localized names of the months: put the system monthnames


Regards
Tore

> 1. nov. 2016 kl. 16.48 skrev J. Landman Gay :
> 
> Thanks everyone, that tells me what I needed to know. I am surprised that the 
> day and month names aren't in the user's language though, I thought they 
> would be.
> 
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software   | http://www.hyperactivesw.com
> 
> 
> 
> On November 1, 2016 9:47:11 AM Tore Nilsen  wrote:
> 
>> Use systemDate does not apply to the internet date. I got the same result 
>> with this set to both true and false.
>> 
>> Tore
>> 
>> 
>>> 1. nov. 2016 kl. 15.24 skrev Richard Gaskin :
>>> 
>>> J. Landman Gay wrote:
>>> 
>>> > Is the internet date in a consistent format in every country? That
>>> > is, except for the spelling of the day and month names, is the format
>>> > always the same?
>>> 
>>> I believe all dates in LC are delivered using US English spellings, except 
>>> when explicitly directed otherwise by setting the useSystemDate to true.
>>> 
>>> With the Internet date, though, the Dictionary notes that it follows RFC 
>>> 2822, which IIFC only supports US English date element names, so I think it 
>>> should be unaffected by the useSystemDate.
>>> 
>>> If anyone using a non-US English system can double-check the format after 
>>> setting the useSystemDate to true it would be helpful to confirm that.
>>> 
>>> --
>>> Richard Gaskin
>>> Fourth World Systems
>>> Software Design and Development for the Desktop, Mobile, and the Web
>>> 
>>> ambassa...@fourthworld.comhttp://www.FourthWorld.com
>>> 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your 
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Lock moves is not working when objects are moved to the points of an other graphic

2016-11-08 Thread Tore Nilsen
In LC 8.1.0 on a Mac with macOS 10.12, I have encountered some problems when 
trying to move several objects simultaneously. The script below works as 
expected:

on mouseUp

set lockmoves to true

move grc "Oval1" from 50,60 to 1200,60 in 350 milliseconds without waiting

move grc "Oval2" from 50,200 to 1280,200 in 2 seconds without waiting

set lockmoves to false

end mouseUp


However, is a try to substitute the startPoint/endPoint with a reference to 
different graphics, the first move is completed, without anything happening 
with the second move. Once the first move is completed, the second object is 
moved to a point along the path that seems to be consistent with where it 
should have been by this time, and the animation then starts from there. Has 
anyone else noticed this?

Regards

Tore
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Lock moves is not working when objects are moved to the points of an other graphic

2016-11-08 Thread Tore Nilsen
Yes, this is what does not work in 8.1.0. I've tried it both on my Macbook and 
on my iMac, and the second movement only start once the first is finished.
I should probably look for a bug report/file a bug report if no other report 
exists.

Tore
> 8. nov. 2016 kl. 17.16 skrev dunbarx :
> 
> Hi.
> 
> Do you mean something like this:
> 
> on mouseUp
> set lockmoves to true
> move grc "Oval1" to the points of grc 3 in 350 milliseconds without waiting
> move grc "Oval2" to the points of grc 4  in 2 seconds without waiting
> set lockmoves to false
> end mouseUp
> 
> Works fine here in v 6.7, so I assume the issue is with v8.
> 
> Craig
> 
> 
> 
> --
> View this message in context: 
> http://runtime-revolution.278305.n4.nabble.com/Lock-moves-is-not-working-when-objects-are-moved-to-the-points-of-an-other-graphic-tp4710197p4710201.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: autoScript

2016-11-16 Thread Tore Nilsen
It works in both 7.1.3 and 8.1.0 and 8.1.1 on MacOS here with me. The script is 
set to whatever you put into the variable. 

Tore
> 16. nov. 2016 kl. 13.57 skrev Richmond :
> 
> Nothing is wrong with this in Livecode 7.1.4
> 
> BUT is does not work in Livecode 8.1.1
> 
> Bug 18864
> 
> Richmond.
> 
> On 16.11.2016 14:44, Richmond wrote:
>> I wonder what's wrong with this:
>> 
>> on mouseUp
>>   put "make me coffee" into SKRIPT
>>   set the script of btn "BB" to SKRIPT
>> end mouseUp
>> 
>> 
>> Richmond.
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: autoScript

2016-11-16 Thread Tore Nilsen
Putting

on mouseUp

put "on mouseUp" & return & "beep" & return & "end mouseUp" into SKRIPT

set the script of btn "BB" to SKRIPT

end mouseUp


into the script of the first button makes button BB trigger a beep as expected, 
also in LC 8.1.1



Regards
Tore

> 16. nov. 2016 kl. 13.57 skrev Richmond :
> 
> Nothing is wrong with this in Livecode 7.1.4
> 
> BUT is does not work in Livecode 8.1.1
> 
> Bug 18864
> 
> Richmond.
> 
> On 16.11.2016 14:44, Richmond wrote:
>> I wonder what's wrong with this:
>> 
>> on mouseUp
>>   put "make me coffee" into SKRIPT
>>   set the script of btn "BB" to SKRIPT
>> end mouseUp
>> 
>> 
>> Richmond.
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: autoScript

2016-11-16 Thread Tore Nilsen
On MacOS 10.12.2


> 16. nov. 2016 kl. 14.21 skrev Richmond :
> 
> Thanks, Tore,
> 
> On which operating system is that?
> 
> Richmond.
> 
> On 16.11.2016 15:10, Tore Nilsen wrote:
>> Putting
>> 
>> on mouseUp
>> 
>> put "on mouseUp" & return & "beep" & return & "end mouseUp" into SKRIPT
>> 
>> set the script of btn "BB" to SKRIPT
>> 
>> end mouseUp
>> 
>> 
>> into the script of the first button makes button BB trigger a beep as 
>> expected, also in LC 8.1.1
>> 
>> 
>> 
>> Regards
>> Tore
>> 
>>> 16. nov. 2016 kl. 13.57 skrev Richmond :
>>> 
>>> Nothing is wrong with this in Livecode 7.1.4
>>> 
>>> BUT is does not work in Livecode 8.1.1
>>> 
>>> Bug 18864
>>> 
>>> Richmond.
>>> 
>>> On 16.11.2016 14:44, Richmond wrote:
>>>> I wonder what's wrong with this:
>>>> 
>>>> on mouseUp
>>>>   put "make me coffee" into SKRIPT
>>>>   set the script of btn "BB" to SKRIPT
>>>> end mouseUp
>>>> 
>>>> 
>>>> Richmond.
>>> 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your 
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: autoScript

2016-11-16 Thread Tore Nilsen
At this point in the discussion I feel a need to clarify that while also the 
original the script (make me coffee) was set, the button BB did not actually 
make coffee. I still had to go to the kitchen and perform the necessary magic 
myself. 

And I think that most people will find that making coffee is slightly beyond 
the capabilities of LC, regardless of version or OS.

Regards
Tore

 
> 16. nov. 2016 kl. 14.37 skrev Mike Bonner :
> 
> Ah, my apologies.  In that case I'm surprised it DOESN'T work in 8 (when
> including on mouseup and end mouseup)
> 
> Now I'm curious.  If I recall correctly, setting a script with an error of
> some type, causes the script to be placed into the button but not actually
> be functional.  Since the more recent versions of lc seem to give less
> latitude in syntax, you might check the result (and it?) after setting the
> script.  In addition, if you go into the script editor afterwards does the
> script actually appear as it should?  If you enter a space (just to set the
> dirty flag) and then re-apply the script from inside the editor, does it
> give an error?
> I think, setting the script pretty much works no matter what, but if the
> script has a problem, while the script is THERE, it just won't work until
> the problem is resolved and reapplied.
> 
> On Wed, Nov 16, 2016 at 6:28 AM, Richmond 
> wrote:
> 
>> I didn't bother to include the 'on mouseUp' and 'end mouseUp' in my initial
>> message as I thought they would be assumed.
>> 
>> Richmond.
>> 
>> 
>> On 16.11.2016 15:24, Mike Bonner wrote:
>> 
>>> I'm surprised it works in 7 since it should result in an orphaned line of
>>> code with no handler designation. (as indicated by tore, you should need
>>> to
>>> include the on mouseup  and end mouseup)
>>> 
>>> On Wed, Nov 16, 2016 at 6:22 AM, Tore Nilsen  wrote:
>>> 
>>> On MacOS 10.12.2
>>>> 
>>>> 
>>>> 16. nov. 2016 kl. 14.21 skrev Richmond :
>>>>> 
>>>>> Thanks, Tore,
>>>>> 
>>>>> On which operating system is that?
>>>>> 
>>>>> Richmond.
>>>>> 
>>>>> On 16.11.2016 15:10, Tore Nilsen wrote:
>>>>> 
>>>>>> Putting
>>>>>> 
>>>>>> on mouseUp
>>>>>> 
>>>>>> put "on mouseUp" & return & "beep" & return & "end mouseUp" into SKRIPT
>>>>>> 
>>>>>> set the script of btn "BB" to SKRIPT
>>>>>> 
>>>>>> end mouseUp
>>>>>> 
>>>>>> 
>>>>>> into the script of the first button makes button BB trigger a beep as
>>>>>> 
>>>>> expected, also in LC 8.1.1
>>>> 
>>>>> 
>>>>>> 
>>>>>> Regards
>>>>>> Tore
>>>>>> 
>>>>>> 16. nov. 2016 kl. 13.57 skrev Richmond :
>>>>>>> 
>>>>>>> Nothing is wrong with this in Livecode 7.1.4
>>>>>>> 
>>>>>>> BUT is does not work in Livecode 8.1.1
>>>>>>> 
>>>>>>> Bug 18864
>>>>>>> 
>>>>>>> Richmond.
>>>>>>> 
>>>>>>> On 16.11.2016 14:44, Richmond wrote:
>>>>>>> 
>>>>>>>> I wonder what's wrong with this:
>>>>>>>> 
>>>>>>>> on mouseUp
>>>>>>>>   put "make me coffee" into SKRIPT
>>>>>>>>   set the script of btn "BB" to SKRIPT
>>>>>>>> end mouseUp
>>>>>>>> 
>>>>>>>> 
>>>>>>>> Richmond.
>>>>>>>> 
>>>>>>> ___
>>>>>>> use-livecode mailing list
>>>>>>> use-livecode@lists.runrev.com
>>>>>>> Please visit this url to subscribe, unsubscribe and manage your
>>>>>>> 
>>>>>> subscription preferences:
>>>> 
>>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>>>>> 
>>>>>> ___
>>>>>> use-livecode mailing list
>>>>>> use-livecode@lists.runrev.com
>>

Re: autoScript

2016-11-16 Thread Tore Nilsen
Has anyone ever been able to make the “makeMeRich” command work? If not, has 
anyone filed a bug report?

Tore
> 16. nov. 2016 kl. 14.49 skrev Mike Bonner :
> 
> On the contrary, when i tried it here I became hot and delicious, and great
> to wake up to in the morning.  Alas, I had added an undo function and have
> since reverted to my normal hermity self. I tried "make me rich" once, but
> I just ended up being triple chocolate cake.
> 
> On Wed, Nov 16, 2016 at 6:43 AM, Tore Nilsen  wrote:
> 
>> At this point in the discussion I feel a need to clarify that while also
>> the original the script (make me coffee) was set, the button BB did not
>> actually make coffee. I still had to go to the kitchen and perform the
>> necessary magic myself.
>> 
>> And I think that most people will find that making coffee is slightly
>> beyond the capabilities of LC, regardless of version or OS.
>> 
>> Regards
>> Tore
>> 
>> 
>>> 16. nov. 2016 kl. 14.37 skrev Mike Bonner :
>>> 
>>> Ah, my apologies.  In that case I'm surprised it DOESN'T work in 8 (when
>>> including on mouseup and end mouseup)
>>> 
>>> Now I'm curious.  If I recall correctly, setting a script with an error
>> of
>>> some type, causes the script to be placed into the button but not
>> actually
>>> be functional.  Since the more recent versions of lc seem to give less
>>> latitude in syntax, you might check the result (and it?) after setting
>> the
>>> script.  In addition, if you go into the script editor afterwards does
>> the
>>> script actually appear as it should?  If you enter a space (just to set
>> the
>>> dirty flag) and then re-apply the script from inside the editor, does it
>>> give an error?
>>> I think, setting the script pretty much works no matter what, but if the
>>> script has a problem, while the script is THERE, it just won't work until
>>> the problem is resolved and reapplied.
>>> 
>>> On Wed, Nov 16, 2016 at 6:28 AM, Richmond 
>>> wrote:
>>> 
>>>> I didn't bother to include the 'on mouseUp' and 'end mouseUp' in my
>> initial
>>>> message as I thought they would be assumed.
>>>> 
>>>> Richmond.
>>>> 
>>>> 
>>>> On 16.11.2016 15:24, Mike Bonner wrote:
>>>> 
>>>>> I'm surprised it works in 7 since it should result in an orphaned line
>> of
>>>>> code with no handler designation. (as indicated by tore, you should
>> need
>>>>> to
>>>>> include the on mouseup  and end mouseup)
>>>>> 
>>>>> On Wed, Nov 16, 2016 at 6:22 AM, Tore Nilsen 
>> wrote:
>>>>> 
>>>>> On MacOS 10.12.2
>>>>>> 
>>>>>> 
>>>>>> 16. nov. 2016 kl. 14.21 skrev Richmond :
>>>>>>> 
>>>>>>> Thanks, Tore,
>>>>>>> 
>>>>>>> On which operating system is that?
>>>>>>> 
>>>>>>> Richmond.
>>>>>>> 
>>>>>>> On 16.11.2016 15:10, Tore Nilsen wrote:
>>>>>>> 
>>>>>>>> Putting
>>>>>>>> 
>>>>>>>> on mouseUp
>>>>>>>> 
>>>>>>>> put "on mouseUp" & return & "beep" & return & "end mouseUp" into
>> SKRIPT
>>>>>>>> 
>>>>>>>> set the script of btn "BB" to SKRIPT
>>>>>>>> 
>>>>>>>> end mouseUp
>>>>>>>> 
>>>>>>>> 
>>>>>>>> into the script of the first button makes button BB trigger a beep
>> as
>>>>>>>> 
>>>>>>> expected, also in LC 8.1.1
>>>>>> 
>>>>>>> 
>>>>>>>> 
>>>>>>>> Regards
>>>>>>>> Tore
>>>>>>>> 
>>>>>>>> 16. nov. 2016 kl. 13.57 skrev Richmond >> :
>>>>>>>>> 
>>>>>>>>> Nothing is wrong with this in Livecode 7.1.4
>>>>>>>>> 
>>>>>>>>> BUT is does not work in Livecode 8.1.1
>>>>>>>>> 
>>>>>>>>> Bug 18864
>>>>>>>>> 
&g

Re: autoScript

2016-11-16 Thread Tore Nilsen
Will the chances of getting rich increase if the randomSeed property is set to 
a higher value? I guess the the blindLuck() function makes heavy use of 
random(goodLuck) Or maybe there is an undocumented goodLuckSeed property 
lurking somewhere in the darkest corners of the engine?


> 16. nov. 2016 kl. 14.57 skrev Mike Bonner :
> 
> I suspect its a misunderstanding of the command.  If I recall correctly it
> requires a library of support function such as hardWork() creativity() and
> perseverance()  Though I guess there are a few people out there who make it
> work by simply using the blindLuck() function over and over until the rng
> pops out the right combination.
> 
> On Wed, Nov 16, 2016 at 6:53 AM, Tore Nilsen  wrote:
> 
>> Has anyone ever been able to make the “makeMeRich” command work? If not,
>> has anyone filed a bug report?
>> 
>> Tore
>>> 16. nov. 2016 kl. 14.49 skrev Mike Bonner :
>>> 
>>> On the contrary, when i tried it here I became hot and delicious, and
>> great
>>> to wake up to in the morning.  Alas, I had added an undo function and
>> have
>>> since reverted to my normal hermity self. I tried "make me rich" once,
>> but
>>> I just ended up being triple chocolate cake.
>>> 
>>> On Wed, Nov 16, 2016 at 6:43 AM, Tore Nilsen  wrote:
>>> 
>>>> At this point in the discussion I feel a need to clarify that while also
>>>> the original the script (make me coffee) was set, the button BB did not
>>>> actually make coffee. I still had to go to the kitchen and perform the
>>>> necessary magic myself.
>>>> 
>>>> And I think that most people will find that making coffee is slightly
>>>> beyond the capabilities of LC, regardless of version or OS.
>>>> 
>>>> Regards
>>>> Tore
>>>> 
>>>> 
>>>>> 16. nov. 2016 kl. 14.37 skrev Mike Bonner :
>>>>> 
>>>>> Ah, my apologies.  In that case I'm surprised it DOESN'T work in 8
>> (when
>>>>> including on mouseup and end mouseup)
>>>>> 
>>>>> Now I'm curious.  If I recall correctly, setting a script with an error
>>>> of
>>>>> some type, causes the script to be placed into the button but not
>>>> actually
>>>>> be functional.  Since the more recent versions of lc seem to give less
>>>>> latitude in syntax, you might check the result (and it?) after setting
>>>> the
>>>>> script.  In addition, if you go into the script editor afterwards does
>>>> the
>>>>> script actually appear as it should?  If you enter a space (just to set
>>>> the
>>>>> dirty flag) and then re-apply the script from inside the editor, does
>> it
>>>>> give an error?
>>>>> I think, setting the script pretty much works no matter what, but if
>> the
>>>>> script has a problem, while the script is THERE, it just won't work
>> until
>>>>> the problem is resolved and reapplied.
>>>>> 
>>>>> On Wed, Nov 16, 2016 at 6:28 AM, Richmond >> 
>>>>> wrote:
>>>>> 
>>>>>> I didn't bother to include the 'on mouseUp' and 'end mouseUp' in my
>>>> initial
>>>>>> message as I thought they would be assumed.
>>>>>> 
>>>>>> Richmond.
>>>>>> 
>>>>>> 
>>>>>> On 16.11.2016 15:24, Mike Bonner wrote:
>>>>>> 
>>>>>>> I'm surprised it works in 7 since it should result in an orphaned
>> line
>>>> of
>>>>>>> code with no handler designation. (as indicated by tore, you should
>>>> need
>>>>>>> to
>>>>>>> include the on mouseup  and end mouseup)
>>>>>>> 
>>>>>>> On Wed, Nov 16, 2016 at 6:22 AM, Tore Nilsen 
>>>> wrote:
>>>>>>> 
>>>>>>> On MacOS 10.12.2
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 16. nov. 2016 kl. 14.21 skrev Richmond >> :
>>>>>>>>> 
>>>>>>>>> Thanks, Tore,
>>>>>>>>> 
>>>>>>>>> On which operating system is that?
>>>>>>>>> 
>>>>>>>>> Richmond.
>>>>>>>>> 
>>>>&g

Re: Recoding: search and replace

2016-11-16 Thread Tore Nilsen
And this should be:

on mouseUp

put script of image "xxx" into tScriptToChange

put 0 into tLineNumber

repeat for each line tLine in tScriptToChange

add 1 to tLineNumber

if "unicodeText" is in tLine then

put replaceText(tLine,"unicodeT","t") into line tLineNumber of tScriptToChange

end if

if "useUnicode" is in tLine then

put "--deprecated code removed (useUnicode)" into line tLineNumber of 
tScriptToChange

end if

end repeat

end mouseUp

> 16. nov. 2016 kl. 16.20 skrev Tore Nilsen :
> 
> I think this will be even faster. Put the script directly into a variable, 
> use a repeat for structure and replace text as needed directly in the 
> variable. You may not notice much of a speed improvement for smaller scripts, 
> but if the script is longer, this should execute faster than your version, as 
> both the "repeat for" structure is faster than the "repeat with" structure, 
> and replacing the text in a variable rather than in the field, should also be 
> faster.
> 
> Regards 
> Tore
>> 16. nov. 2016 kl. 13.13 skrev Richmond :
>> 
>> So; here I am, as per usual, replying to my own message having found that 
>> nothing quite so elaborate was required:
>> 
>> /put empty into fld "fSSS1"//
>> //   put the script of img "xxx" into fld "fSSS1"//
>> //   put the number of lines of fld "fSSS1" into TERMINUS//
>> //   put 1 into QOUNT//
>> //   repeat until QOUNT > TERMINUS//
>> //  if line QOUNT of fld "fSSS1" contains "unicodeText" then//
>> // put line QOUNT of fld "fSSS1" into PROCESST//
>> // put replaceText(PROCESST,"unicodeT","t") into line QOUNT of fld 
>> "fSSS1"//
>> //  end if//
>> //  if line QOUNT of fld "fSSS1" contains "useUnicode" then//
>> // put "--deprecated code removed (useUnicode)" into line QOUNT of 
>> fld "fSSS1"//
>> // end if//
>> // add 1 to QOUNT//
>> //  end repeat//
>> ///
>> Richmond.
>> 
>> On 6.11.2016 14:44, Richmond wrote:
>>> I wonder if there is a way to replace this:
>>> 
>>> set the unicodeText of fld "fDECODE" to (numToCodePoint(107) & 
>>> numToCodePoint(104))
>>> 
>>> with this:
>>> 
>>> *put (numToCodePoint(107) & numToCodePoint(104)) into fld "fDECODE"*
>>> 
>>> where /(numToCodePoint(107) & numToCodePoint(104))/ vary?
>>> 
>>> I have no great urge to do that sort of thing manually about 6 million 
>>> times.
>>> 
>>> Richmond.
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Recoding: search and replace

2016-11-16 Thread Tore Nilsen
I think this will be even faster. Put the script directly into a variable, use 
a repeat for structure and replace text as needed directly in the variable. You 
may not notice much of a speed improvement for smaller scripts, but if the 
script is longer, this should execute faster than your version, as both the 
"repeat for" structure is faster than the "repeat with" structure, and 
replacing the text in a variable rather than in the field, should also be 
faster.

Regards 
Tore
> 16. nov. 2016 kl. 13.13 skrev Richmond :
> 
> So; here I am, as per usual, replying to my own message having found that 
> nothing quite so elaborate was required:
> 
> /put empty into fld "fSSS1"//
> //   put the script of img "xxx" into fld "fSSS1"//
> //   put the number of lines of fld "fSSS1" into TERMINUS//
> //   put 1 into QOUNT//
> //   repeat until QOUNT > TERMINUS//
> //  if line QOUNT of fld "fSSS1" contains "unicodeText" then//
> // put line QOUNT of fld "fSSS1" into PROCESST//
> // put replaceText(PROCESST,"unicodeT","t") into line QOUNT of fld 
> "fSSS1"//
> //  end if//
> //  if line QOUNT of fld "fSSS1" contains "useUnicode" then//
> // put "--deprecated code removed (useUnicode)" into line QOUNT of 
> fld "fSSS1"//
> // end if//
> // add 1 to QOUNT//
> //  end repeat//
> ///
> Richmond.
> 
> On 6.11.2016 14:44, Richmond wrote:
>> I wonder if there is a way to replace this:
>> 
>> set the unicodeText of fld "fDECODE" to (numToCodePoint(107) & 
>> numToCodePoint(104))
>> 
>> with this:
>> 
>> *put (numToCodePoint(107) & numToCodePoint(104)) into fld "fDECODE"*
>> 
>> where /(numToCodePoint(107) & numToCodePoint(104))/ vary?
>> 
>> I have no great urge to do that sort of thing manually about 6 million times.
>> 
>> Richmond.
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Retrieve the date from an external source.

2016-11-29 Thread Tore Nilsen
I need to retrieve the date from an external source, in order to bypass any 
changes to the date settings on the users computer. This is to ensure that a 
user cannot start an event until the proper date. (A digital advent calendar) I 
was foolishly thinking that the internet date was what I was looking for, but 
it is just another way to format the internal date as set by the user. 
Therefore, getting the internet date does not bypass any changes to the 
machines local settings. 

Information about the proper date for each event is stored as a custom property 
of different images in the application. This property is in the form of 
localized date, and is converted to seconds for comparison with the actually 
date, which of course is also converted to seconds. Everything here works as 
expected, but changing the computers date settings will allow the user to 
override the restraints in the script. I therefore need to get the date from a 
source outside the control of the user. (The application is a desktop 
standalone.)

 I am in a bit of a hurry (deadline on Thursday this week) and I can not seem 
to find any solutions searching for it in the usual places. I am unfamiliar 
with retrieving data from servers and services, so I am unfortunately stuck at 
the moment. Any help will much appreciated.

Regards 
Tore Nilsen
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Retrieve the date from an external source.

2016-11-29 Thread Tore Nilsen
Thank you for your quick response. And this is where my lack of experience with 
working with lc-scripts and servers shines through. Although I have an account 
with LiveCode, I do not know how to access lc-server via this account. When I 
try this I only get the command in return, not the date.

Regards
Tore


> 29. nov. 2016 kl. 16.04 skrev Matthias Rebbe 
> :
> 
> Hi tore,
> 
> i am using  Livecode Server for such tasks.
> 
> To get the correct date in an LC app i use 
> 
> put URL “http://yourserver.com/whatsthetime.lc” into tCurrentDate
> 
> where yourserver.com is of course my server and whatsthetime.lc  contains the 
> following
> 
> put the short system time
> or 
> put the system date
> 
> Before LC server i  used a php script to get the current date in my Flash 
> Advent calendar.
> 
> Regards,
> 
> Matthias
> 
> 
> 
> Matthias Rebbe
> Bramkampsieke 13
> 32312 Lübbecke
> Tel   +49 5741 31
>   +49 160 5504462
> Fax: +49 5741 310002
> eMail: matth...@m-r-d.de <mailto:matth...@m-r-d.de>
> 
> BR5 Konverter - BR5 -> MP3 <http://matthiasrebbe.eu/portfolio/produkte/brx/>
>> Am 12.01.2017 um 15:58 schrieb Tore Nilsen :
>> 
>> I need to retrieve the date from an external source, in order to bypass any 
>> changes to the date settings on the users computer. This is to ensure that a 
>> user cannot start an event until the proper date. (A digital advent 
>> calendar) I was foolishly thinking that the internet date was what I was 
>> looking for, but it is just another way to format the internal date as set 
>> by the user. Therefore, getting the internet date does not bypass any 
>> changes to the machines local settings. 
>> 
>> Information about the proper date for each event is stored as a custom 
>> property of different images in the application. This property is in the 
>> form of localized date, and is converted to seconds for comparison with the 
>> actually date, which of course is also converted to seconds. Everything here 
>> works as expected, but changing the computers date settings will allow the 
>> user to override the restraints in the script. I therefore need to get the 
>> date from a source outside the control of the user. (The application is a 
>> desktop standalone.)
>> 
>> I am in a bit of a hurry (deadline on Thursday this week) and I can not seem 
>> to find any solutions searching for it in the usual places. I am unfamiliar 
>> with retrieving data from servers and services, so I am unfortunately stuck 
>> at the moment. Any help will much appreciated.
>> 
>> Regards 
>> Tore Nilsen
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Retrieve the date from an external source.

2016-11-29 Thread Tore Nilsen
Brilliant! Now I have what I need to push on!

Thank you.

Tore


> 29. nov. 2016 kl. 16.50 skrev Matthias Rebbe :
> 
> The script should be as follows
> 
>  put the system date
> ?>
> 
> You need to declare the beginning of the script with  
> and the end of the script with ?>
> 
> 
>> Am 12.01.2017 um 16:26 schrieb Tore Nilsen > <mailto:tore.nil...@me.com>>:
>> 
>> Thank you for your quick response. And this is where my lack of experience 
>> with working with lc-scripts and servers shines through. Although I have an 
>> account with LiveCode, I do not know how to access lc-server via this 
>> account. When I try this I only get the command in return, not the date.
>> 
>> Regards
>> Tore
>> 
>> 
>>> 29. nov. 2016 kl. 16.04 skrev Matthias Rebbe 
>>> >> <mailto:matthias_livecode_150...@m-r-d.de> 
>>> <mailto:matthias_livecode_150...@m-r-d.de 
>>> <mailto:matthias_livecode_150...@m-r-d.de>>>:
>>> 
>>> Hi tore,
>>> 
>>> i am using  Livecode Server for such tasks.
>>> 
>>> To get the correct date in an LC app i use 
>>> 
>>> put URL “http://yourserver.com/whatsthetime.lc 
>>> <http://yourserver.com/whatsthetime.lc>” into tCurrentDate
>>> 
>>> where yourserver.com <http://yourserver.com/> is of course my server and 
>>> whatsthetime.lc  contains the following
>>> 
>>> put the short system time
>>> or 
>>> put the system date
>>> 
>>> Before LC server i  used a php script to get the current date in my Flash 
>>> Advent calendar.
>>> 
>>> Regards,
>>> 
>>> Matthias
>>> 
>>> 
>>> 
>>> Matthias Rebbe
>>> Bramkampsieke 13
>>> 32312 Lübbecke
>>> Tel +49 5741 31
>>> +49 160 5504462
>>> Fax: +49 5741 310002
>>> eMail: matth...@m-r-d.de <mailto:matth...@m-r-d.de> 
>>> <mailto:matth...@m-r-d.de <mailto:matth...@m-r-d.de>> 
>>> <mailto:matth...@m-r-d.de <mailto:matth...@m-r-d.de> 
>>> <mailto:matth...@m-r-d.de <mailto:matth...@m-r-d.de>>>
>>> 
>>> BR5 Konverter - BR5 -> MP3 <http://matthiasrebbe.eu/portfolio/produkte/brx/ 
>>> <http://matthiasrebbe.eu/portfolio/produkte/brx/> 
>>> <http://matthiasrebbe.eu/portfolio/produkte/brx/ 
>>> <http://matthiasrebbe.eu/portfolio/produkte/brx/>>>
>>>> Am 12.01.2017 um 15:58 schrieb Tore Nilsen :
>>>> 
>>>> I need to retrieve the date from an external source, in order to bypass 
>>>> any changes to the date settings on the users computer. This is to ensure 
>>>> that a user cannot start an event until the proper date. (A digital advent 
>>>> calendar) I was foolishly thinking that the internet date was what I was 
>>>> looking for, but it is just another way to format the internal date as set 
>>>> by the user. Therefore, getting the internet date does not bypass any 
>>>> changes to the machines local settings. 
>>>> 
>>>> Information about the proper date for each event is stored as a custom 
>>>> property of different images in the application. This property is in the 
>>>> form of localized date, and is converted to seconds for comparison with 
>>>> the actually date, which of course is also converted to seconds. 
>>>> Everything here works as expected, but changing the computers date 
>>>> settings will allow the user to override the restraints in the script. I 
>>>> therefore need to get the date from a source outside the control of the 
>>>> user. (The application is a desktop standalone.)
>>>> 
>>>> I am in a bit of a hurry (deadline on Thursday this week) and I can not 
>>>> seem to find any solutions searching for it in the usual places. I am 
>>>> unfamiliar with retrieving data from servers and services, so I am 
>>>> unfortunately stuck at the moment. Any help will much appreciated.
>>>> 
>>>> Regards 
>>>> Tore Nilsen
>>>> ___
>>>> use-livecode mailing list
>>>> use-livecode@lists.runrev.com
>>>> Please visit this url to subscribe, unsubscribe and manage your 
>>>> subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>> 
>>> ___

Re: TreeView custom sort?

2016-12-10 Thread Tore Nilsen
Could you build the initial array with the object names as keys, add the layer 
numbers as part of the information you store about each element,  then sort the 
array by layer numbers and set the array of the tree view widget to the sorted 
array? Or am I missing something in your description here? 

Regards
Tore Nilsen


> 10. des. 2016 kl. 18.30 skrev Richard Gaskin :
> 
> I need a sort of object browser, and have been playing around with the 
> TreeView widget as a possible quick solution.
> 
> Handy for many things, but being array-based it seems my options for sorting 
> are limited.
> 
> Like the IDE's Object Browser, I need a sort order which reflects physical 
> layering of objects.
> 
> I could number these as I add them to the array, but the numbers would be 
> meaningless to the user, as they would be in the Object Browser.
> 
> I'd like to show the object name instead, but I can't find a way to do that 
> while maintaining a fixed order.
> 
> Any ideas, or am I back to making a custom control for this?
> 
> -- 
> Richard Gaskin
> Fourth World Systems
> Software Design and Development for the Desktop, Mobile, and the Web
> 
> ambassa...@fourthworld.comhttp://www.FourthWorld.com
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


SQLite and single quote characters

2016-12-28 Thread Tore Nilsen
I am using my Christmas break to try to teach myself how to use SQLite with 
LiveCode. (Hopefully I will be able to teach my students how to use it also, 
come January.) In this process I ran into a problem, where the script I used 
did not insert a new record to the database as expected. Some records were 
created, others were not, but no errors were reported.

I managed to track it down to the fact that in the instances where it did not 
work, some of the data I wanted to register included the use of the single 
quote character. This resulted in no new records being inserted, but LC did not 
report any errors.

As a single quote may be a valid character in some instances where I intend to 
use SQLite databases, I am now at odds with how to proceed. Does anyone have a 
solution to this problem?   

Regards
Tore Nilsen
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: SQLite and single quote characters

2016-12-28 Thread Tore Nilsen
Thank you. It worked a charm!

Tore


> 28. des. 2016 kl. 20.04 skrev Devin Asay :
> 
> Tore,
> 
> I believe you have to escape single quotes in SQL data. See this 
> stackoverflow question:
> 
> https://stackoverflow.com/questions/603572/how-to-properly-escape-a-single-quote-for-a-sqlite-database
> 
> Devin
> 
> 
> On Dec 28, 2016, at 11:54 AM, Tore Nilsen 
> mailto:tore.nil...@me.com>> wrote:
> 
> I am using my Christmas break to try to teach myself how to use SQLite with 
> LiveCode. (Hopefully I will be able to teach my students how to use it also, 
> come January.) In this process I ran into a problem, where the script I used 
> did not insert a new record to the database as expected. Some records were 
> created, others were not, but no errors were reported.
> 
> I managed to track it down to the fact that in the instances where it did not 
> work, some of the data I wanted to register included the use of the single 
> quote character. This resulted in no new records being inserted, but LC did 
> not report any errors.
> 
> As a single quote may be a valid character in some instances where I intend 
> to use SQLite databases, I am now at odds with how to proceed. Does anyone 
> have a solution to this problem?
> 
> Regards
> Tore Nilsen
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com<mailto:use-livecode@lists.runrev.com>
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> Devin Asay
> Director
> Office of Digital Humanities
> Brigham Young University
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: 8.1.2 Offset bug fixed!

2017-01-04 Thread Tore Nilsen
Not so sure about that. Remember he is the mastermind behind everything. I take 
everything to also mean bugs. :-)

Tore


> 4. jan. 2017 kl. 19.57 skrev Bob Sneidar  >:
> 
> There wouldn't be any bugs id He did. :-)

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Data Grid objects in standalones

2015-02-06 Thread Tore Nilsen
I am using several Data Grid objects, as tables, in a standalone. When I try to 
manually enter data into fields in the data grid object it works alright as 
long as the main stack and the substacks are built as a single file, but not 
when I try to build the standalone with the substacks as separate files. I 
guess the reason is that the main stack loses connection with the Data Grid 
Template stack once this is moved into a separate file. I would however prefer 
to have the substacks as individual files in order to be able to upgrade them 
easily, without the need for an upgrade of the application as such. Are there 
any solutions to this problem that does not require a total rebuild of the 
application structure.

Tore N
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Data Grid objects in standalones

2015-02-06 Thread Tore Nilsen
The problem with letting the compiler handle this is that I cannot access the 
Data Grid Template stack from the main stack if it is not a part of the engine 
file. The standalone setup dialog is somewhat confusing in the sense that it 
seems as if it is possible to choose which substack files to include with the 
engine file and which substack files to branch out in a folder of its own. As 
far as I have discovered it is all or nothing. I guess I will have to dive into 
the code of the main stack again and write relative paths to all the stacks I 
don’t want to be a part of the engine. Luckily there are not very many of them, 
and they are not called from more than a couple of handlers. 

Tore N


> 6. feb. 2015 kl. 22.17 skrev Bob Sneidar :
> As mentioned in the past, the easiest way around this is to have a mainstack 
> that calls your actual application stacks. Password protect the app stacks if 
> you like to protect the code. That way the app stacks are not actually a part 
> of the read-only application, they are like support files that can be 
> modified if put in the right place, which the compiler does for you.
> 
> Bob S
> 
> 
> On Feb 6, 2015, at 12:47 , Tore Nilsen 
> mailto:tore.nil...@me.com>> wrote:
> 
> I am using several Data Grid objects, as tables, in a standalone. When I try 
> to manually enter data into fields in the data grid object it works alright 
> as long as the main stack and the substacks are built as a single file, but 
> not when I try to build the standalone with the substacks as separate files. 
> I guess the reason is that the main stack loses connection with the Data Grid 
> Template stack once this is moved into a separate file. I would however 
> prefer to have the substacks as individual files in order to be able to 
> upgrade them easily, without the need for an upgrade of the application as 
> such. Are there any solutions to this problem that does not require a total 
> rebuild of the application structure.
> 
> Tore N
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Data Grid objects in standalones

2015-02-06 Thread Tore Nilsen
Thanks for pointing me in this direction. I have read this lesson, and I have 
also made the data grid templates dud, although there should be no need for it, 
as the compiler does include the correct data grid template as a substack. The 
problem arises when I choose to move substacks into individual files during 
compiling. Then the application seems to lose contact with the data grid 
template stack. This happens whether or not I include a substack called data 
grid templates dud or not. As I need to get my application ready for my 
students for Monday, I think I will do as Bob S suggests and just “rewire” the 
structure in code.


Tore N


> 6. feb. 2015 kl. 22.32 skrev Mike Bonner :
> 
> Tore, read this.
> http://lessons.runrev.com/m/datagrid/l/7339-what-do-i-need-to-do-to-deploy-a-standalone-with-a-data-grid
> 
> Specifically the part of bulding with a datagrid using a splashstack.  The
> easiest way to get functional datagrids that are parts of seperate stack
> files is to incuded a single substack in your main that is named "datagrid
> templates dud" so that the builder will decide to include all the datagrid
> support libraries.  More detail available in the link from above.
> 
> On Fri, Feb 6, 2015 at 2:27 PM, Tore Nilsen  wrote:
> 
>> The problem with letting the compiler handle this is that I cannot access
>> the Data Grid Template stack from the main stack if it is not a part of the
>> engine file. The standalone setup dialog is somewhat confusing in the sense
>> that it seems as if it is possible to choose which substack files to
>> include with the engine file and which substack files to branch out in a
>> folder of its own. As far as I have discovered it is all or nothing. I
>> guess I will have to dive into the code of the main stack again and write
>> relative paths to all the stacks I don’t want to be a part of the engine.
>> Luckily there are not very many of them, and they are not called from more
>> than a couple of handlers.
>> 
>> Tore N
>> 
>> 
>>> 6. feb. 2015 kl. 22.17 skrev Bob Sneidar :
>>> As mentioned in the past, the easiest way around this is to have a
>> mainstack that calls your actual application stacks. Password protect the
>> app stacks if you like to protect the code. That way the app stacks are not
>> actually a part of the read-only application, they are like support files
>> that can be modified if put in the right place, which the compiler does for
>> you.
>>> 
>>> Bob S
>>> 
>>> 
>>> On Feb 6, 2015, at 12:47 , Tore Nilsen > tore.nil...@me.com>> wrote:
>>> 
>>> I am using several Data Grid objects, as tables, in a standalone. When I
>> try to manually enter data into fields in the data grid object it works
>> alright as long as the main stack and the substacks are built as a single
>> file, but not when I try to build the standalone with the substacks as
>> separate files. I guess the reason is that the main stack loses connection
>> with the Data Grid Template stack once this is moved into a separate file.
>> I would however prefer to have the substacks as individual files in order
>> to be able to upgrade them easily, without the need for an upgrade of the
>> application as such. Are there any solutions to this problem that does not
>> require a total rebuild of the application structure.
>>> 
>>> Tore N
>>> 
>>> 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Data Grid objects in standalones

2015-02-06 Thread Tore Nilsen
Either that or having the possibility to choose which substacks to include in 
the application and which substacks to save as individual stacks would help. 

Tore

> 6. feb. 2015 kl. 23.11 skrev Mike Bonner :
> 
> DOH, thats what you said above, though this might be a good time for a
> feature request.  It would be nice if inclusions were searched for BEFORE
> the option to disconnect substacks into seperate stack files, it would make
> building splashstack.
> 
> On Fri, Feb 6, 2015 at 2:32 PM, Mike Bonner  wrote:
> 
>> Tore, read this.
>> http://lessons.runrev.com/m/datagrid/l/7339-what-do-i-need-to-do-to-deploy-a-standalone-with-a-data-grid
>> 
>> Specifically the part of bulding with a datagrid using a splashstack.  The
>> easiest way to get functional datagrids that are parts of seperate stack
>> files is to incuded a single substack in your main that is named "datagrid
>> templates dud" so that the builder will decide to include all the datagrid
>> support libraries.  More detail available in the link from above.
>> 
>> On Fri, Feb 6, 2015 at 2:27 PM, Tore Nilsen  wrote:
>> 
>>> The problem with letting the compiler handle this is that I cannot access
>>> the Data Grid Template stack from the main stack if it is not a part of the
>>> engine file. The standalone setup dialog is somewhat confusing in the sense
>>> that it seems as if it is possible to choose which substack files to
>>> include with the engine file and which substack files to branch out in a
>>> folder of its own. As far as I have discovered it is all or nothing. I
>>> guess I will have to dive into the code of the main stack again and write
>>> relative paths to all the stacks I don’t want to be a part of the engine.
>>> Luckily there are not very many of them, and they are not called from more
>>> than a couple of handlers.
>>> 
>>> Tore N
>>> 
>>> 
>>>> 6. feb. 2015 kl. 22.17 skrev Bob Sneidar :
>>>> As mentioned in the past, the easiest way around this is to have a
>>> mainstack that calls your actual application stacks. Password protect the
>>> app stacks if you like to protect the code. That way the app stacks are not
>>> actually a part of the read-only application, they are like support files
>>> that can be modified if put in the right place, which the compiler does for
>>> you.
>>>> 
>>>> Bob S
>>>> 
>>>> 
>>>> On Feb 6, 2015, at 12:47 , Tore Nilsen >> tore.nil...@me.com>> wrote:
>>>> 
>>>> I am using several Data Grid objects, as tables, in a standalone. When
>>> I try to manually enter data into fields in the data grid object it works
>>> alright as long as the main stack and the substacks are built as a single
>>> file, but not when I try to build the standalone with the substacks as
>>> separate files. I guess the reason is that the main stack loses connection
>>> with the Data Grid Template stack once this is moved into a separate file.
>>> I would however prefer to have the substacks as individual files in order
>>> to be able to upgrade them easily, without the need for an upgrade of the
>>> application as such. Are there any solutions to this problem that does not
>>> require a total rebuild of the application structure.
>>>> 
>>>> Tore N
>>>> 
>>>> 
>>>> ___
>>>> use-livecode mailing list
>>>> use-livecode@lists.runrev.com
>>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>> 
>>> 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>> 
>> 
>> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Passing control away and back again

2015-02-15 Thread Tore Nilsen
Why don’t you just register the missing parts in a variabel, go on with the 
preOpenStack script and then, depending on what is missing, go to a card where 
the user then can enter the information needed. When the information is 
registered the user will be taken to the application itself with all the 
information in place. 

Tore N

> 15. feb. 2015 kl. 13.14 skrev Graham Samuel :
> 
> This is probably very dumb, but I've got into a muddle thinking about " 'Go 
> To' Considered Harmful", if anyone is old enough to remember that Dutch 
> utterance... anyway:
> 
> In LC, really everything is dealt with in handlers which begin, execute and 
> end and can be nested within one another. So how do you construct a control 
> structure like the following:
> 
> 1. The program starts up with a 'startup' handler (could use 'preOpenStack' 
> but it's not so good). The script there does setting-up things, and then it 
> notices that it needs extensive user input (for example, maybe the program 
> isn't registered and we need some details - even maybe payment) before we can 
> go on.
> 
> 2. To get the user input, the script does a 'go to' (which is really an 
> 'open') to a special stack for this input. Eventually, the data is input and 
> checked, and the user clicks say an "OK" button to get back to the startup 
> process.
> 
> 3. What happens now? The script can't easily resume the original startup 
> handler, can it? After all, the special stack which deals with user input is 
> not a handler nested within the startup handler. The "OK" button is driven by 
> a 'mouseUp' handler, but when that handler closes, there is no automatic way 
> of going back to the calling handler of the whole process (the startup 
> handler) due to the lack of nesting. What the script **can** do is to invoke 
> a further handler in the original card where the startup is, called perhaps 
> 'continueStartup', so that at the end of the 'mouseUp' script, we simply call 
> this new handler.
> 
> This kind of works, but we are left with loose ends: the original 'startup' 
> handler never reaches its termination point ('end startUp') as far as I can 
> see, and the 'resume' script doesn't exactly terminate either, does it? If it 
> did, we'd end up in the 'mouseUp' script in a stack (window), which is 
> probably closed by now, having done its job. So viewed as a set of control 
> structures, it looks a mess.
> 
> OK, there is a way of doing it, kind of, but what is the most logical way to 
> approach this problem of non-nested control structures?
> 
> TIA for any thoughts
> 
> Graham
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Passing control away and back again

2015-02-15 Thread Tore Nilsen
I’ll admit my explanation wasn’t as thorough as it should have been. I was 
thinking along the same lines as Paul though, splitting the startup procedure 
in appropriate parts as sub handlers which could be performed individually. 
Instead of opening another stack if certain criteria were met, you could opt to 
go to a card in the stack itself, where the user could enter the information 
needed to complete the start up procedure. Then you would not need to use send 
when finalising the procedure. You would only need to call the  code 
from the mouseUp handler on the “input card” and then go to whichever card you 
like. 


Tore


> 15. feb. 2015 kl. 16.02 skrev Graham Samuel :
> 
> Tore and Paul thanks for your ultra-rapid replies - and on a Sunday, too!
> 
> Actually I don't understand Tore's solution at all, sorry. I simply can't 
> follow what structure is being suggested. (As and aside, I don't want to use 
> a 'preOpenStack' stack script because I want a script that is executed 
> exactly once when the app is originally started, and 'startUp' is a 
> specialised message for doing just that. 'preOpenStack' is executed every 
> time a stack is opened, which in some circumstances could be inappropriate.)
> 
> But I do understand Paul's, which was very near the approach I was thinking 
> of taking myself. I suppose I am still worried about the 'send'. Sending 
> isn't calling, is it? I mean, in principle, a handler like "dopart2" in 
> Paul's example will be executed, and then control will return to the script 
> that executed the 'send', won't it? So we end up executing "end mouseUp" in 
> the context of the button that was clicked, not the script that was running 
> in the 'startUp' handler. Perhaps this doesn't matter, but this is the issue 
> I'm trying to get my head around. Anyway it's a viable solution and I'm 
> grateful.
> 
> Graham
> 
>> On 15 Feb 2015, at 13:37, Paul Dupuis  wrote:
>> 
>> If you code looked like this:
>> 
>> on startup
>> 
>> if  then
>>   open stack 
>>   exit startUp
>> end if
>> 
>> end startup
>> 
>> and your   exits in a mouseUp handler such as
>> 
>> on mouseUp
>> close this stack
>> end mouseUp
>> 
>> you would need to restructure you code like this:
>> 
>> on startUp
>> doPart1
>> if  then
>>  open stack 
>>  exit startup
>> end if
>> doPart2
>> end startup
>> 
>> on doPart1
>> 
>> end doPart1
>> 
>> on doPart2
>> 
>> end doPart2
>> 
>> and the  mouseUp handler would be modified as
>> on mouseUp
>> close this stack
>> send "doPart2" to  in 1 tick
>> end mouseUp
>> 
>> This places the  and  blocks in separate
>> handlers in the main stack so that the  handler can be
>> invoked from the mouseUp on the input stack.
> 
> 
>> On 15 Feb 2015, at 13:27, Tore Nilsen  wrote:
>> 
>> Why don’t you just register the missing parts in a variabel, go on with the 
>> preOpenStack script and then, depending on what is missing, go to a card 
>> where the user then can enter the information needed. When the information 
>> is registered the user will be taken to the application itself with all the 
>> information in place. 
>> 
>> Tore N
>> 
>>> 15. feb. 2015 kl. 13.14 skrev Graham Samuel :
>>> 
>>> This is probably very dumb, but I've got into a muddle thinking about " 'Go 
>>> To' Considered Harmful", if anyone is old enough to remember that Dutch 
>>> utterance... anyway:
>>> 
>>> In LC, really everything is dealt with in handlers which begin, execute and 
>>> end and can be nested within one another. So how do you construct a control 
>>> structure like the following:
>>> 
>>> 1. The program starts up with a 'startup' handler (could use 'preOpenStack' 
>>> but it's not so good). The script there does setting-up things, and then it 
>>> notices that it needs extensive user input (for example, maybe the program 
>>> isn't registered and we need some details - even maybe payment) before we 
>>> can go on.
>>> 
>>> 2. To get the user input, the script does a 'go to' (which is really an 
>>> 'open') to a special stack for this input. Eventually, the data is input 
>>> and checked, and the user clicks say an "OK" button to get back to the 
>>> startup process.
>>

Re: HTML muddle

2015-02-18 Thread Tore Nilsen
Have you tried using Brackets together with the Chrome-browser? This will give 
you a live update of the html in the Chrome browser as you edit the code in 
Brackets. 

My students use Brackets for their html tasks, and I am also using it myself to 
produce html-pages to be displayed in the browser object in one of my 
applications. If you know basic html you will be able to produce your stuff 
without to much hassle. You will off course have to copy and past the html from 
Brackets into LiveCode unless you opt for the browser solution.

Tore

> 18. feb. 2015 kl. 10.32 skrev Graham Samuel :
> 
> Folks, the muddle is mine. I am in the situation where I have a fairly 
> elaborately formatted field (say ‘myFormattedText) - coloured text, different 
> fonts, styles and sizes. This text is static in my standalone, but I have 
> often needed to change it during development. I have not found a simple way 
> to do this, and I have now resorted to having a ‘plain text’ field (‘myText’) 
> with the whole html of the target field in it, and at initialisation time I 
> execute:
> 
>  set the htmlText of fld “myFormattedText” to fld “myText”
> 
> This seems kind of mad, but I can’t see how I can edit the original text in 
> situ during the development process: so I am reduced to editing the raw html 
> in the ‘myText’ field, which is painful because I haven’t got an editor which 
> will edit the html while displaying it in its final form. So I just use a 
> text editor like TextWrangler (this is on a Mac). Of course in doing this I 
> make loads of mistakes.
> 
> I’ve been doing this for some time, but my approach must be wrong - it’s just 
> too clunky.
> 
> What does everyone else do?
> 
> TIA
> 
> Graham
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Inserting a character at the text insertion point in a field

2015-04-28 Thread Tore Nilsen
I try to make a script in a field to allow only numbers or the decimal sign to 
be entered into the field. To block any other key is easy, but I have run into 
problems when I try to insert the decimal sign at the text insertion point in 
the field. 

This script only allows me to insert the decimal sign at the end of the string. 
I seem to be unable to find any help in the lessons on the runner web site or 
in the dictionary.  Does anyone have a smart solution that I can use to impress 
my students, and maybe help them in their preparations for their exam?

on keyDown theKey
  if theKey is a number then
  pass keyDown
end if
   if theKey is "." or theKey is "," then
  if the text of me is not empty and "." is not in me then
 put "." after me
      end if
   end if
end keyDown

—

Tore Nilsen
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Inserting a character at the text insertion point in a field

2015-04-28 Thread Tore Nilsen
Thank you!
It did the trick nicely. Sometimes the solution is just too easy! In Norway 
comma is used as a decimal sign, and this way my students can make a script 
that will allow the user to write whatever decimal sign they choose. 


Tore


> 28. apr. 2015 kl. 21.17 skrev Peter Haworth :
> 
> Hi Tore,
> You'll need to to use the selectedChunk property of the field. Check out
> the dictionary entry for it but as long as no text is selected in the
> field, replace your put statement with:
> 
> put word 4 of the selectedChunk of me into tPos
> put "." after char tPos of me
> 
> 
> Pete
> lcSQL Software <http://www.lcsql.com>
> Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and
> SQLiteAdmin <http://www.lcsql.com/sqliteadmin.html>
> 
> On Tue, Apr 28, 2015 at 12:06 PM, Tore Nilsen  wrote:
> 
>> I try to make a script in a field to allow only numbers or the decimal
>> sign to be entered into the field. To block any other key is easy, but I
>> have run into problems when I try to insert the decimal sign at the text
>> insertion point in the field.
>> 
>> This script only allows me to insert the decimal sign at the end of the
>> string. I seem to be unable to find any help in the lessons on the runner
>> web site or in the dictionary.  Does anyone have a smart solution that I
>> can use to impress my students, and maybe help them in their preparations
>> for their exam?
>> 
>> on keyDown theKey
>>  if theKey is a number then
>>  pass keyDown
>> end if
>>   if theKey is "." or theKey is "," then
>>  if the text of me is not empty and "." is not in me then
>> put "." after me
>>  end if
>>   end if
>> end keyDown
>> 
>> —
>> 
>> Tore Nilsen
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Inserting a character at the text insertion point in a field

2015-04-28 Thread Tore Nilsen
This gets better and better! The last solution seems to cover all 
eventualities! Thank you!

Tore

> 28. apr. 2015 kl. 21.26 skrev Paul Hibbert :
> 
> Or another way, replace…
> 
>>   put "." after me
> 
> …with:
> 
> put "." into the selection
> 
> Works OK here, and allows you to replace a number with a period if you typed 
> it wrong.
> 
> Paul
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

  1   2   3   >