Re: defining and using globals in an application

2011-07-07 Thread Jerry J
Mark,

I have been bitten badly by the fact that globals persist until LC is quit. 
Actually, my injury was in the days of HyperCard, which is responsible for this 
behavior! Two stacks written by the same author which needed to run on the same 
machine - the author had habits for naming variables, including globals. There 
were so many name collisions that I gave up and rewrote the whole mess in LC 
(which was a good thing anyway). Telling the user to QUIT HyperCard before 
going to the other function didn't work out so well. Thats my falldown story.

I have forgotten to declare globals many many times, and thats too bad for me. 
Now I turn on explicit variables for any new projects. Its a bit more work up 
front, but you find those oh-so-frequent errors and typos right away. And, I 
find I basically never need or want globals. Like Scott said, custom properties 
usually are a better idea, if a bit more verbose (which is not a bad thing). 

What language is there that will let you share variable values between 
programs? Controlling the scope of variable names is increasingly important 
as projects grow, and HyperCard's only mechanism, globals, wasn't enough.

At some point you have to realize that this is the way this works. Changing it 
now would break uncountable programs. LC has given us ways to end the 
confusion. If its just the semantics of the word global, just say NO and quit 
using it!

Onward,
Jerry meatball doesn't work that way Jensen


On Jul 6, 2011, at 10:18 PM, Scott Rossi wrote:

 Hi Mark:
 
 If I understand what you're looking for, there are other ways to get what
 you want if you don't want to declare a global: you could use a custom
 property or a function.
 
  the specialGlobalValue of this stack
  specialGlobalValue()
 
 I disagree with your assessment of declaring globals as a falldown issue.
 In fact, I would say it's the reverse.  When coming back to code after a
 hiatus of development, or when looking at someone else's code, the fact that
 the global is declared as such can clarify where its value originates from
 (to my mind anyway).
 
 Regards,
 
 Scott Rossi
 Creative Director
 Tactile Media, UX Design
 
 
 
 Recently, Mark Stuart wrote:
 
 Again, my point exactly.
 You HAVE to declare the global again, and again where needed.
 
 I'd rather it once declared and a value put into it, the value be available
 elsewhere WITHOUT having to declare it again.
 It just sets up the developer for an easy falldown. The time it takes,
 especially for a different developer in the same application or coming back
 some time later, to find the declared global name.
 
 Which brings up a whole new issue of intelli-sense or type-ahead
 variable-name-while-typing-a-script convention.
 But I won't go there at this time.
 
 
 
 ___
 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: defining and using globals in an application

2011-07-07 Thread Mark Wieder
Jacque-

Wednesday, July 6, 2011, 10:24:06 PM, you wrote:

 On 7/6/11 11:22 PM, Slava Paperno wrote:
 It is okay (technically, anyway) to have identically-named global,
 script local, and handler local variables.

 You can't have identically named local variable within the scope of the
 variable,   but you can have identically named script variables in different
 scripts and identically named local variables in different handlers within
 the same script.

 Right. Basically I meant that names can be duplicated anywhere provided
 they are outside of each other's scope. I didn't say it that way very well.

Once again, no, it doesn't work that way. Global variables are *never*
out of scope, so you can *not* have global and local variables with
the same name. Even if the global variable is declared in a different
script, it's still lurking in memory ready to bite you. You can not
compile

global xyzzy

in one script and then try to compile

local xyzzy

in another script.

-- 
-Mark Wieder
 mwie...@ahsoftware.net


___
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: a color picker widget?

2011-07-07 Thread Slava Paperno
Yes, of course--how stupid of me to forget about answer color.

Thanks, Jen, Ken,

S.

 -Original Message-
 From: use-livecode-boun...@lists.runrev.com [mailto:use-livecode-
 boun...@lists.runrev.com] On Behalf Of Jan Schenkel
 Sent: Thursday, July 07, 2011 1:06 AM
 To: How to use LiveCode
 Subject: Re: a color picker widget?
 
 --- On Wed, 7/6/11, Slava Paperno sl...@lexiconbridge.com wrote:
  Is there a color-picker widget that I
  could insert into my stack? I want the
  user to be able to choose a color. I know I can simply
  display a graphic
  with a color wheel and tell the user to click (and test the
  color under the
  mouse), but a conventional interface for choosing a color
  would be best...
  Thanks for any pointers,
 
  Slava
 
 
 Hi Slava,
 
 If you don't mind a modal dialog box, you can use the 'answer color'
 command.
 
 HTH,
 
 Jan Schenkel.
 =
 Quartam Reports  PDF Library for LiveCode
 www.quartam.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


Re: defining and using globals in an application

2011-07-07 Thread stephen barncard
I took a tip from Andre and basically use *one or two big global arrays* in
apps and on-rev.

 - namespace problem solved. Easy to manage, remember and DELETE. I can use
the same keys for things with different arrays, name the keys anything I
want, and they can be saved to a custom property if needed. Or not.

sqb

On 6 July 2011 22:59, Jerry J j...@jhj.com wrote:

 Mark,

 I have been bitten badly by the fact that globals persist until LC is quit.
 Actually, my injury was in the days of HyperCard, which is responsible for
 this behavior! Two stacks written by the same author which needed to run on
 the same machine - the author had habits for naming variables, including
 globals. There were so many name collisions that I gave up and rewrote the
 whole mess in LC (which was a good thing anyway). Telling the user to QUIT
 HyperCard before going to the other function didn't work out so well. Thats
 my falldown story.

 I have forgotten to declare globals many many times, and thats too bad for
 me. Now I turn on explicit variables for any new projects. Its a bit more
 work up front, but you find those oh-so-frequent errors and typos right
 away. And, I find I basically never need or want globals. Like Scott said,
 custom properties usually are a better idea, if a bit more verbose (which is
 not a bad thing).

 What language is there that will let you share variable values between
 programs? Controlling the scope of variable names is increasingly
 important as projects grow, and HyperCard's only mechanism, globals, wasn't
 enough.

 At some point you have to realize that this is the way this works. Changing
 it now would break uncountable programs. LC has given us ways to end the
 confusion. If its just the semantics of the word global, just say NO and
 quit using it!

 Onward,
 Jerry meatball doesn't work that way Jensen


 On Jul 6, 2011, at 10:18 PM, Scott Rossi wrote:

  Hi Mark:
 
  If I understand what you're looking for, there are other ways to get what
  you want if you don't want to declare a global: you could use a custom
  property or a function.
 
   the specialGlobalValue of this stack
   specialGlobalValue()
 
  I disagree with your assessment of declaring globals as a falldown
 issue.
  In fact, I would say it's the reverse.  When coming back to code after a
  hiatus of development, or when looking at someone else's code, the fact
 that
  the global is declared as such can clarify where its value originates
 from
  (to my mind anyway).
 
  Regards,
 
  Scott Rossi
  Creative Director
  Tactile Media, UX Design
 
 
 
  Recently, Mark Stuart wrote:
 
  Again, my point exactly.
  You HAVE to declare the global again, and again where needed.
 
  I'd rather it once declared and a value put into it, the value be
 available
  elsewhere WITHOUT having to declare it again.
  It just sets up the developer for an easy falldown. The time it takes,
  especially for a different developer in the same application or coming
 back
  some time later, to find the declared global name.
 
  Which brings up a whole new issue of intelli-sense or type-ahead
  variable-name-while-typing-a-script convention.
  But I won't go there at this time.
 
 
 
  ___
  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




-- 



Stephen Barncard
San Francisco Ca. USA

more about sqb  http://www.google.com/profiles/sbarncar
___
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 ungroup a group of one

2011-07-07 Thread Slava Paperno
I have somehow created a group that contains one object, a button. I think I
grouped two objects and then  deleted one of them or something. Anyway, this
group that contains one button is indestructible. Clicking the Ungroup
button when it is selected, or using the ungroup group id X command
displays no errors, but the group is still there.

To make it even funnier, that indestructible group is a member of another
group:

put the name of control 6 of group navigation
--group UnintendedGroupOfOne

select control 6 of group navigation
ungroup the selectedObjects
put the name of control 6 of group navigation
--group UnintendedGroupOfOne

This defies what the Dictionary says: Use the ungroup command to change the
constituents of a group, or to turn grouped controls into card controls.

Any cure for that?

Slava



___
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: a color picker widget?

2011-07-07 Thread FlexibleLearning
On Jul 6, 2011, at 11:58 PM, Slava Paperno wrote:

 Is there a color-picker widget that I could insert into my stack? I want
the
 user to be able to choose a color. I know I can simply display a graphic
 with a color wheel and tell the user to click (and test the color under
the
 mouse), but a conventional interface for choosing a color would be best...

Ken suggested...

 answer color
 put it into tRGB


Note that you can also specify the picker's initial display color to avoid
the default of black...

answer color with myRGBTriplet
put it into tRGB

Hugh Senior
FLCo


___
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 ungroup a group of one

2011-07-07 Thread Chipp Walters
Slava,

Chances are it is ungrouped, but just not displaying correctly in the
Application Browser. Try hitting the refresh button at the bottom of the
Application Browser tree and the App Browser will show again the current
group structure.

This bug is why I wrote the Group Manager plugin for LiveCode:
http://blog.chipp.com/update-to-group-manager-plugin-for-livecode/

On Thu, Jul 7, 2011 at 1:35 AM, Slava Paperno sl...@lexiconbridge.comwrote:

 I have somehow created a group that contains one object, a button. I think
 I
 grouped two objects and then  deleted one of them or something. Anyway,
 this
 group that contains one button is indestructible. Clicking the Ungroup
 button when it is selected, or using the ungroup group id X command
 displays no errors, but the group is still there.

 To make it even funnier, that indestructible group is a member of another
 group:

 put the name of control 6 of group navigation
 --group UnintendedGroupOfOne

 select control 6 of group navigation
 ungroup the selectedObjects
 put the name of control 6 of group navigation
 --group UnintendedGroupOfOne

 This defies what the Dictionary says: Use the ungroup command to change
 the
 constituents of a group, or to turn grouped controls into card controls.

 Any cure for that?

 Slava



 ___
 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




-- 
Chipp Walters
CEO, Shafer Walters Group, Inc.
___
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 ungroup a group of one

2011-07-07 Thread Chipp Walters
If that doesn't fix it, then try putting a link to your stack online and
some of us may be able to help find the problem.

On Thu, Jul 7, 2011 at 2:52 AM, Chipp Walters ch...@chipp.com wrote:

 Slava,

 Chances are it is ungrouped, but just not displaying correctly in the
 Application Browser. Try hitting the refresh button at the bottom of the
 Application Browser tree and the App Browser will show again the current
 group structure.

 This bug is why I wrote the Group Manager plugin for LiveCode:
 http://blog.chipp.com/update-to-group-manager-plugin-for-livecode/


 On Thu, Jul 7, 2011 at 1:35 AM, Slava Paperno sl...@lexiconbridge.comwrote:

 I have somehow created a group that contains one object, a button. I think
 I
 grouped two objects and then  deleted one of them or something. Anyway,
 this
 group that contains one button is indestructible. Clicking the Ungroup
 button when it is selected, or using the ungroup group id X command
 displays no errors, but the group is still there.

 To make it even funnier, that indestructible group is a member of another
 group:

 put the name of control 6 of group navigation
 --group UnintendedGroupOfOne

 select control 6 of group navigation
 ungroup the selectedObjects
 put the name of control 6 of group navigation
 --group UnintendedGroupOfOne

 This defies what the Dictionary says: Use the ungroup command to change
 the
 constituents of a group, or to turn grouped controls into card controls.

 Any cure for that?

 Slava



 ___
 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




 --
 Chipp Walters
 CEO, Shafer Walters Group, Inc.




-- 
Chipp Walters
CEO, Shafer Walters Group, Inc.
___
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


Unicode in buttons?

2011-07-07 Thread Malte Brill
Hi all,

I am struggeling to have russian drop down menus...
Did anyone manage to display unicode text in buttons? If so I'd appreciate any 
pointer!

All the best,

Malte
___
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: Unicode in buttons?

2011-07-07 Thread Malte Brill
Nevermind. Forgot I need to set the font for the button...
Why must this be so complicated? *sigh*

Malte

___
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


Linking step of external object build failed

2011-07-07 Thread Terry Vogelaar
I tried to get started building an external for iOS. So I tried to follow along 
with the video on http://www.youtube.com/watch?v=lqduyQkhigg step by step. It 
worked fine a few days ago, but it stopped working. The only change I can think 
of is upgrading to 10.6.8. Actually, the build succeeded, and if chosen, the 
simulator starts up, but no binaries were created, so I cannot test on a device.

The examples don't seem to have this problem. But every newly created project 
does. Here are the details:

SIMULATOR:
PhaseScriptExecution Build External 
build/rreDevice.build/Debug-iphonesimulator/rreDevice.build/Script-4D3B0F3C1367DD4000E00C1E.sh
cd /Users/tvogelaar/Dropbox/rreDevice
/bin/sh -c 
/Users/tvogelaar/Dropbox/rreDevice/build/rreDevice.build/Debug-iphonesimulator/rreDevice.build/Script-4D3B0F3C1367DD4000E00C1E.sh

Undefined symbols:
  ___libinfoptr_rreDevice, referenced from:
 -exported_symbol[s_list] command line option
ld: symbol(s) not found
error: linking step of external object build failed

DEVICE:
PhaseScriptExecution Build External 
build/rreDevice.build/Debug-iphoneos/rreDevice.build/Script-4D3B0F3C1367DD4000E00C1E.sh
cd /Users/tvogelaar/Dropbox/rreDevice
/bin/sh -c 
/Users/tvogelaar/Dropbox/rreDevice/build/rreDevice.build/Debug-iphoneos/rreDevice.build/Script-4D3B0F3C1367DD4000E00C1E.sh

ld: cannot export hidden symbol ___libinfoptr_rreDevice for architecture armv6
error: linking step of external object build failed


Anyone experiencing this as well?

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


LiveCode.tv Event #30 Wrap-Up[

2011-07-07 Thread Mark Schonewille
Dear LiveCoders,

Last Saturday, 2 July, we had another nice on-line gathering of LiveCode fans. 
This time we had 2 cool presentations by Judy and Chipp. Additionally, we set a 
record as the event was attended by over 30 people! Yay!

Judy started the event with a beginners session. She discussed the creation and 
use of tab buttons and menu buttons. If you have just started using LiveCode, 
then this video is a must-see. (Unfortunately, I don't have the download links 
for Judy's stacks yet; I might add them to the blog later).

You can watch Judy's video here:
http://www.ustream.tv/recorded/15757319

Chipp showed his new altButton droptool and InterfaceDesigner and talked about 
the MagicCarpet AutoUpdate Architecture. All attendants were allowed to 
download a complimentary copy of InterfaceDesigner. At http://qery.us/uh is 
also a free download of altButton available. Thanks Chipp!

You can find Chipp's presentation at
http://www.ustream.tv/recorded/15758078

The European HyperCard User Group (eHUG, http://www.ehug.info) raffled off an 
e-book courtesy of TidBITS. The e-book was won by Steve. You can find more info 
on the TC series at http://www.takecontrolbooks.com.

We are still looking for someone to present this Saturday (9 July)!!! If you 
would like to participate in the event, now or later, please head over to 
http://qery.us/u0 for ideas and contact Mark or Björnke. At http://qery.us/du 
you can find a web form that makes it really easy to contact us. 

I hope to see you all at the event next time. We will be making announcements 
on this mailing list and at http://livecode.tv where you can also find a copy 
of this text. 

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

New: Download the Installer Maker Plugin 1.6 for LiveCode here http://qery.us/ce


___
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 up Mac LiveCode apps on an iPad ?

2011-07-07 Thread Francis Nugent Dixon

Hi from Beautiful Brittany,

When the iPad came out, I thought WOW, with the
idea of carrying my LiveCode apps with me.
Then I found out that (of course), I had to pay for this
facility (OK - Business is Business !).
I don't really want to develop new apps on an iPad,
but move existing LiveCode apps to an iPad (mostly
data-base interrogation and update apps).
I decided to let things drop - I am retired, and I have
limited resources, and above all, I don't want to sell
anything I build. So I am a difficult client to please !
- and, of course, I have to pay for the iPad !

Now I have some questions :

If I pay $99 for iOS functions, can I move my existing
apps to an iPad? (reducing LiveCode windows to iPad
dimensions is my problem, I can do this !).
(in the LiveCode for iOS page, it says FROM JUST $99,
and I have learned to add but usually much more to such
statements. !!
If I can move my apps to an iPad, and I update a file on
the iPad, can I download it back to my Mac ?
(Because some of my external files are big, maybe I
should put them up on my Run-Rev Server).
Assuming Yes to my first questions, what storage
should I choose for the iPad (16, 32, )?
What sort of conversion problems will I encounter ?
(an answer like - none, small or big will suffice !)
What the hell is this Apple Development program ?
If I only develop apps for MY iPad, certainly not interested
in submitting apps to the App Store, must I comply ?
Are there any other nasty surprises waiting for me if
I want to run my Livecode apps on an iPad ?

Thanks for any input (especially positive input !!)

-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


Re: Setting up Mac LiveCode apps on an iPad ?

2011-07-07 Thread Mark Schonewille
Hi Francis,

To make apps for your own iPad and keep them running, you need to pay for the 
Apple dev programme every year unfortunately.

In continental Europe, you pay 79 euro + VAT. I believe it is illegal to put 
consumer prices without VAT on a website in Europe, but RunRev still uses 
prices without VAT. The correct price is currently €94,80 for a personal 
license. Such a license allows you to make standalones with a splash screen 
with the RunRev logo, and a message saying something like This app is not for 
distribution.

Sorry for being somewhat negative :-)

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

New: Download the Installer Maker Plugin 1.6 for LiveCode here http://qery.us/ce

On 7 jul 2011, at 14:36, Francis Nugent Dixon wrote:

 Hi from Beautiful Brittany,
 
 When the iPad came out, I thought WOW, with the
 idea of carrying my LiveCode apps with me.
 Then I found out that (of course), I had to pay for this
 facility (OK - Business is Business !).
 I don't really want to develop new apps on an iPad,
 but move existing LiveCode apps to an iPad (mostly
 data-base interrogation and update apps).
 I decided to let things drop - I am retired, and I have
 limited resources, and above all, I don't want to sell
 anything I build. So I am a difficult client to please !
 - and, of course, I have to pay for the iPad !
 
 Now I have some questions :
 
 If I pay $99 for iOS functions, can I move my existing
 apps to an iPad? (reducing LiveCode windows to iPad
 dimensions is my problem, I can do this !).
 (in the LiveCode for iOS page, it says FROM JUST $99,
 and I have learned to add but usually much more to such
 statements. !!
 If I can move my apps to an iPad, and I update a file on
 the iPad, can I download it back to my Mac ?
 (Because some of my external files are big, maybe I
 should put them up on my Run-Rev Server).
 Assuming Yes to my first questions, what storage
 should I choose for the iPad (16, 32, )?
 What sort of conversion problems will I encounter ?
 (an answer like - none, small or big will suffice !)
 What the hell is this Apple Development program ?
 If I only develop apps for MY iPad, certainly not interested
 in submitting apps to the App Store, must I comply ?
 Are there any other nasty surprises waiting for me if
 I want to run my Livecode apps on an iPad ?
 
 Thanks for any input (especially positive input !!)
 
 -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


Re: defining and using globals in an application

2011-07-07 Thread Richard Gaskin

Mark Stuart wrote:

You HAVE to declare the global again, and again where needed.

I'd rather it once declared and a value put into it, the value be available
elsewhere WITHOUT having to declare it again.


As Jacque pointed out, LC and related dialects are very forgiving with 
the scope of variable names, so it's possible to have one token used as 
a global, a local, and an argument.  To avoid confusing the compiler, we 
need to declare globals in any script that uses them.


If that one line of code at the top of a script is cumbersome (and in 
some complex code bases it may well be), try accessors instead:


-- In a mainstack, library, backscript, or other globally-available
-- script:
global gDefaultWidgetHeight

command SetDefaultWidgetHeight pVal
  put pVal into gDefaultWidgetHeight
end SetDefaultWidgetHeight

function GetDefaultWidgetHeight
   return gDefaultWidgetHeight
end GetDefaultWidgetHeight
---

With those in place you can get and set the value stored in the global 
from any other script without a declaration, e.g.:


  set the height of grp 1 to GetDefaultWidgetHeight()
  SetDefaultWidgetHeight 200

Another benefit to using accessors is that they help factor code; that 
is, you can change how you store that value at any time without having 
to modify any code that relies on it.  Today it might be a global, but 
two versions from now it might be a database record; with accessors, you 
only change two handlers and everything else comes along for the ride.


True, using accessors will impair performance relative to calling the 
global directly.  But in practical terms you're only looking at a 
fraction of a *micro*second, so if you need to liberate your code base 
from direct storage references chances are no one will ever notice the 
performance difference.


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 LiveCode Journal blog: http://LiveCodejournal.com/blog.irv

___
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


Display prices without VAT/WAS Re: Setting up Mac LiveCode apps on an iPad ?

2011-07-07 Thread Klaus on-rev
Hi Mark and RunRev,

Am 07.07.2011 um 15:35 schrieb Mark Schonewille:

 Hi Francis,
 
 ...
 In continental Europe, you pay 79 euro + VAT. I believe it is illegal to put 
 consumer prices without VAT on a website in Europe, but RunRev still uses 
 prices without VAT.

This is true!

 ...
 --
 Best regards,
 
 Mark Schonewille

Best

Klaus

--
Klaus Major
http://www.major-k.de
kl...@major.on-rev.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


Re: Gottit!

2011-07-07 Thread Nonsanity
Well the email isn't coming from him, it's coming from the list server, but
is tagged from him. Some mailing lists do this, and Gmail should really have
some way to detect that, otherwise all mailing lists read through Gmail will
incorrectly mark posts from other Gmail users as possible forgeries.

It's a new feature - I imagine they'll fix that before long.

 ~ Chris Innanen
 ~ Nonsanity
 ~ (Yes, it's really me.)


On Wed, Jul 6, 2011 at 3:33 PM, stephen barncard 
stephenrevoluti...@barncard.com wrote:

 Richmond, this is off-topic, but I use google mail and your messages are
 being tagged as not being you:

 http://fulton.barncard.com/bugz/richmond.png

 with an explanation from google

 http://mail.google.com/support/bin/answer.py?hl=en-GBctx=mailanswer=185812


 Now I don't have to read the headers to know it's really you, but there
 appears to be no It's Really Richmond, honest button.

  I've seen this on a couple of posts from others on this list.



 On 6 July 2011 11:50, Richmond Mathewson richmondmathew...@gmail.com
 wrote:

  --**--**--
 
 
  a.k.a Richmond finally finds the paracetemol
 
  put the selectedChunk into CHUNGK
  select after CHUNGK
 
  Yippee-Doo, Caloo-Caleh, and other foolish noises demonstrating that
 after
  a year I have finally found the cure to a besetting problem.
 
  Thanks Slava and Mark for getting it wrong in such a way that it goaded
 me
  into cracking the thing at least . . .  :)
 
  --**---
 
  This still is useless, as it only functions in the first line of a
  multi-line
  unicodeText field . . .
 
  He who crows like a cockerel is, indeed, a fool
 
  if one uses   put the selectedChunk
 
  there is no value if the cursor lies somewhere in the second or third
 line
  of text
 
  similarly  put the selectedLine  on yields a value [ e.g.  line 1 of
 field
  6] when the
  cursor is somewhere in the first line
 
 
 
  __**_
  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
 http://lists.runrev.com/mailman/listinfo/use-livecode
 



 --



 Stephen Barncard
 San Francisco Ca. USA

 more about sqb  http://www.google.com/profiles/sbarncar
 ___
 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: defining and using globals in an application

2011-07-07 Thread Nonsanity
On Thu, Jul 7, 2011 at 2:07 AM, Mark Wieder mwie...@ahsoftware.net wrote:

 Once again, no, it doesn't work that way. Global variables are *never*
 out of scope, so you can *not* have global and local variables with
 the same name. Even if the global variable is declared in a different
 script, it's still lurking in memory ready to bite you. You can not
 compile

 global xyzzy

 in one script and then try to compile

 local xyzzy

 in another script.


Actually you can, and I just tested it to be sure. I've got two buttons, one
with global TestVar and a mouseup handler that adds 1 to TextVar then
answers it, and a second button that has local TestVar and does the same
thing.

Clicking each in turn shows that the two values remain independent from each
other. This is because variables defined as global are only in scope if the
environment (usually a script) has defined the same global with the same
name.

A third button with just the mouseup script and no global or local always
displays 1 since the value of the handler-local TestVar is not preserved
from one execution to the next. It isn't automatically getting access to the
global declared in another script. It would have to be declared in each
script that wants to access it.

The message box is a special case where all globals are available to it
without having to explicitly declare them. (But not locals, of course, which
remain in-scope only within the script where they are defined.)

It doesn't bother the environment at all that a global and a local have the
same name, so long as they are defined in different scripts. (Actually, you
can define a local at the top of a script, then define the SAME name as a
global on the next line, and there won't be an error. Though the global line
WILL be ignored. Attempting the same thing in the opposite order results in
a compile error. Go figure...)

I always take a single page from the Hungarian Notation guidelines and put a
lowercase g before all global variable names. That way I always keep in
mind it's global nature, and I can never accidentally reuse the same name as
a local variable and get confused. (Note, only I would be confused by this,
not LiveCode.)

But I rarely use globals these days. I find using custom stack or card
properties work much better for most of the tasks I would have used a global
for. Plus they are preserved from session to session, unlike globals, and
can be made card-specific with the same name if needed.

It basically turns a single named storage location into a multi-named
storage location. Instead of just TestVar it would become TestVar of card
1, etc. Custom properties are far superior to globals in functionality (in
my opinion) and more clear about scope.


Hope that helps,
 ~ Chris Innanen
 ~ Nonsanity
___
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: defining and using globals in an application

2011-07-07 Thread Francis Nugent Dixon

Hi from Beautiful Brittany,

I think Scott has the right attitude. Use globals
if you need them, Use custom properties if you don't
like the power/scope/limitations of globals.

In addition, I use Do global xyz and delete global xyz
to have rigorous dynamic control over global variables.

During stack development, I often use :

put the globalNames into LVGlobals
do global   LVGlobals

to get the values of all current globals (including
system globals)

Very useful !

-Francis

Nothing should ever be done for the first time !

___
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: defining and using globals in an application

2011-07-07 Thread Richard Gaskin

Francis Nugent Dixon wrote:


I think Scott has the right attitude. Use globals
if you need them, Use custom properties if you don't
like the power/scope/limitations of globals.


I would respectfully amend that to read:

Use globals if you need them, use custom properties if you need data 
bound persistently to an object, and use accessors for anything else.


Variables are volatile (they go away when the session ends), and that's 
a very useful feature in many cases.  Binding data to objects can cause 
those values to remain with the object if the object is in a stack that 
gets saved.  If you need values to persist between sessions then 
properties may be the best choice, but if you need volatility globals or 
accessors that use globals can be a better fit.


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 LiveCode Journal blog: http://LiveCodejournal.com/blog.irv

___
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: defining and using globals in an application

2011-07-07 Thread Nonsanity
I actually prefer to use custom properties even for values that I want to be
session-specific. The reason being that I'd rather have personal control
over when the value is cleared than leave it to the environment to handle.
This way I can be sure I know the contents of the variable (as a custom
property) at all times. It never gets changed out from under me, and so will
never surprise me or my code.

With globals, you need to handle the case of an empty (unset) value
everywhere the global is used, or you need to initialize the global to a
starting value at startup - The place where it will get emptied at the start
of each session.

Using a custom property, if you need the value to be reset to a particular
value on startup you do it yourself in the OpenCard or PreOpenCard. If you
want it to be emptied like a global, you can do that there too. But at least
you have all the control yourself. No more surprises.

I really only use globals when I'm doing a quick hack script for debugging
purposes, but even there my old Hypercard habits (where globals were the
only option) are being replaced with custom properties.

I really do think of custom properties as the complete replacement, in all
ways, for globals.

(I never did like having those single lines of code (aka global TestVar)
living outside of any handler in my scripts. They were - if I may use the
past tense - an ugly feature of the language too...)

 ~ Chris Innanen
 ~ Nonsanity



On Thu, Jul 7, 2011 at 11:01 AM, Richard Gaskin
ambassa...@fourthworld.comwrote:

 Francis Nugent Dixon wrote:

  I think Scott has the right attitude. Use globals
 if you need them, Use custom properties if you don't
 like the power/scope/limitations of globals.


 I would respectfully amend that to read:

 Use globals if you need them, use custom properties if you need data bound
 persistently to an object, and use accessors for anything else.

 Variables are volatile (they go away when the session ends), and that's a
 very useful feature in many cases.  Binding data to objects can cause those
 values to remain with the object if the object is in a stack that gets
 saved.  If you need values to persist between sessions then properties may
 be the best choice, but if you need volatility globals or accessors that use
 globals can be a better fit.

 --
  Richard Gaskin
  Fourth World
  LiveCode training and consulting: http://www.fourthworld.com
  Webzine for LiveCode developers: http://www.LiveCodeJournal.com
  LiveCode Journal blog: 
 http://LiveCodejournal.com/**blog.irvhttp://LiveCodejournal.com/blog.irv


 __**_
 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-livecodehttp://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


defining and using globals in an application

2011-07-07 Thread Slava Paperno
 (I never did like having those single lines of code (aka global TestVar)
living outside of any handler in my scripts. They were - if I may use the
past tense - an ugly feature of the language too...)

We're all different (well, most of us). I like having a list of all
variables right there, at the top of each handler or script. It's
self-documenting, and the language forces me to maintain a discipline. (But
then I also like to line up the icons on my desktop.)

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


defining and using globals in an application

2011-07-07 Thread Mark Stuart
Hi all,
Well, I didn't expect such a passionate response from a lot of folk
about globals and related containers of variable values.
So point taken about globals. Very interesting ideas and concepts that I
very much appreciate, because I learned something today from y'all.

Stephen - interesting concepts from Andre.
Jerry J - many software development tools allow values of variables to
be passed to other programs, functions, you name it, they are there.
Specifically, the one I use every day - MSE's eDeveloper and their new
version: uniPaaS. They allow the declaration of globals, which the
values can be obtained from anywhere in the entire application.
Jacqueline - are you saying that two different applications (as
executables or as .rev/.livecode stacks) using the same global name can
be referenced by one another, and share the same values? That's bizarre.
Francis - I like the concept. I will give it a go.
Richard - I like your concepts. I'll give it a go.



___
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: defining and using globals in an application

2011-07-07 Thread Mark Wieder
Chris-

Thursday, July 7, 2011, 7:50:41 AM, you wrote:

 Actually you can, and I just tested it to be sure. I've got two buttons, one
 with global TestVar and a mouseup handler that adds 1 to TextVar then
 answers it, and a second button that has local TestVar and does the same
 thing.

Interesting. I *did* try myself before posting, but I did this in the
same script:

on mouseUp
  global xyzzy
  local xyzzy
end mouseUp

and the compiler properly complains about that. I guess it's not quite
smart enough to catch this across different scripts. I'd file a bug
about this, but since I don't use global vars anyway I don't think
I'll bother.

-- 
-Mark Wieder
 mwie...@ahsoftware.net


___
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: OpenField and keeping the focus on the field

2011-07-07 Thread Bob Sneidar
cannot attach in list.

Bob


On Jul 6, 2011, at 8:35 PM, Slava Paperno wrote:

 Tom,
 
 I attach a stack that does what I think you were trying to do.
 
 Slava
 
 -Original Message-
 From: use-livecode-boun...@lists.runrev.com [mailto:use-livecode-
 boun...@lists.runrev.com] On Behalf Of Tom Johnson
 Sent: Wednesday, July 06, 2011 8:42 PM
 To: LC Questions
 Subject: OpenField and keeping the focus on the field
 
 Hello,
 I'm running into a similar problem as another that's currently on the
 list.
 What I'm trying to do is
 keep the focus on the field where the script below lives. If I do a
 simple
 focus on me or
 something similar it goes into a loop of openField. If there's a way to
 keep
 the focus
 in the field please fill me in. If there's something wrong with my
 approach,
 I'm
 open to suggestions. There other fields and buttons on the card with
 this
 field too. If
 the focus stays in the field the rest of the script does work.
 
 
 Thanks,
 Tom
 
 ___
 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: defining and using globals in an application

2011-07-07 Thread Richard Gaskin

Nonsanity wrote:


I actually prefer to use custom properties even for values that I want to be
session-specific. The reason being that I'd rather have personal control
over when the value is cleared than leave it to the environment to handle.
This way I can be sure I know the contents of the variable (as a custom
property) at all times. It never gets changed out from under me, and so will
never surprise me or my code.

With globals, you need to handle the case of an empty (unset) value
everywhere the global is used, or you need to initialize the global to a
starting value at startup - The place where it will get emptied at the start
of each session.

Using a custom property, if you need the value to be reset to a particular
value on startup you do it yourself in the OpenCard or PreOpenCard. If you
want it to be emptied like a global, you can do that there too. But at least
you have all the control yourself. No more surprises.

I really only use globals when I'm doing a quick hack script for debugging
purposes, but even there my old Hypercard habits (where globals were the
only option) are being replaced with custom properties.

I really do think of custom properties as the complete replacement, in all
ways, for globals.


Respectfully, those issues and solutions seem to work both ways.  For 
example, you can set the value of a global on preOpenCard just as easily 
as you can set the value of a property, and any script from anywhere can 
alter a property just as easily as it can alter a global.


For myself, in addition to the persistence issue (I'm a compulsive 
saver) it comes down to simply laziness - I'd rather write:


  SetDefaultWidgetHeight 200

...than:

  set the uDefaultWidgetHeight of button someButton \
of card someCard of stack someStack to 200

Where properties are unbeatable is when you need to bind data to a 
specific object. If you have multiple objects in which each need a 
different value, implementing those as properties is the with-the-grain 
solution.


But if you need something that's global in scope, I see no harm in using 
globals.


From time to time I come across recommendations that globals are 
somehow bad practice, yet almost every language supports them so I'm 
inclined to think they have a place among our options for value storage.


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 LiveCode Journal blog: http://LiveCodejournal.com/blog.irv

___
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: defining and using globals in an application

2011-07-07 Thread Bob Sneidar
I think you are saying there ought to be something called a stack global, that 
if declared there outside any script, will be available without declaring it in 
any of the substacks scripts. Yes? 

The reason they do things the way they do is so that you do not accidentally 
reference a global that was declared in some other app you are building. Let's 
say you have an accounting stack, and you have an address book stack. You 
decide to incorporate the address book stack into your accounting app instead 
of building a customer stack from scratch. 

In the stack script of both you have a global called vDatabase, which contains 
the name of the database where the data is hosted. Without this kind of scoping 
of variables, you could never be sure that they didn't get confused. 

Bob


On Jul 6, 2011, at 8:29 PM, Mark Stuart wrote:

 Hi Slava,
 
 My point exactly.
 You have to define it again in every stack, or substack you want to use the
 value thereof.
 I define my globals at the top of each stack, outside any script. But only
 those globals I need in that stack.
 
 I think it is unnatural to call it a global and the value of that global
 not be available anywhere else (in other stacks), unless you define that
 global again.
 
 This sets up the scenario of typing the global names incorrectly, or missing
 to define it where needed.
 
 Regards,
 Mark Stuart
 
 
 ___
 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: defining and using globals in an application

2011-07-07 Thread J. Landman Gay

On 7/7/11 1:07 AM, Mark Wieder wrote:


Once again, no, it doesn't work that way. Global variables are *never*
out of scope, so you can *not* have global and local variables with
the same name.


You can if you turn off explicitVariables.

--
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


Re: defining and using globals in an application

2011-07-07 Thread Bob Sneidar
Try custom properties instead. Store your values in a stack property and they 
will be retrievable from anywhere. 

Bob


On Jul 6, 2011, at 9:45 PM, Mark Stuart wrote:

 Hi Slava,
 You wrote:
 
 You said the value of that global not be available anywhere else, but the
 value IS available everywhere else. You just have to declare that this is a
 global variable before using it, so LC knows where to fetch that value.
 
 
 Again, my point exactly.
 You HAVE to declare the global again, and again where needed.
 
 I'd rather it once declared and a value put into it, the value be available
 elsewhere WITHOUT having to declare it again.
 It just sets up the developer for an easy falldown. The time it takes,
 especially for a different developer in the same application or coming back
 some time later, to find the declared global name.
 
 Which brings up a whole new issue of intelli-sense or type-ahead
 variable-name-while-typing-a-script convention.
 But I won't go there at this time.
 
 Regards,
 Mark Stuart
 
 
 ___
 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: defining and using globals in an application

2011-07-07 Thread J. Landman Gay

On 7/7/11 10:36 AM, Mark Stuart wrote:


Jacqueline - are you saying that two different applications (as
executables or as .rev/.livecode stacks) using the same global name can
be referenced by one another, and share the same values? That's bizarre.


No, not at all. In your own standalone, globals and all other variables 
belong only to your scripts and it's safe. The conflict arises only if 
you are working with stacks in the IDE. Plugins are a good example, or 
any stacks you download from RevOnline. If one of those uses the same 
global name as a local variable in your own script, you'll get the other 
author's values instead of yours.


It could happen with your own stacks too if you're like many of us and 
tend to use the same names in different stacks for certain things.


--
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


Re: defining and using globals in an application

2011-07-07 Thread Bob Sneidar
Safe way around this is to delete all your globals upon closing your stack. 

Bob


On Jul 6, 2011, at 10:59 PM, Jerry J wrote:

 Mark,
 
 I have been bitten badly by the fact that globals persist until LC is quit.


___
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: defining and using globals in an application

2011-07-07 Thread Bob Sneidar
I don't think she said that. I think she is talking about in the dev 
environment. Globals are global to Livecode, not just the stack, assuming you 
declare them in the script or handler. Obviously, in an executable, the OS is 
going to firewall each app from the other, unless you make a way for them to 
communicate with each other. 

Bob


On Jul 7, 2011, at 8:36 AM, Mark Stuart wrote:

 Jacqueline - are you saying that two different applications (as
 executables or as .rev/.livecode stacks) using the same global name can
 be referenced by one another, and share the same values? That's bizarre.


___
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: defining and using globals in an application

2011-07-07 Thread Bob Sneidar
I don't think it's a bug IMHO. How can a variable in the same script have 2 
scopes? How would the app know which you were talking about when you used it? 

Bob


On Jul 7, 2011, at 8:38 AM, Mark Wieder wrote:

 Interesting. I *did* try myself before posting, but I did this in the
 same script:
 
 on mouseUp
  global xyzzy
  local xyzzy
 end mouseUp
 
 and the compiler properly complains about that. I guess it's not quite
 smart enough to catch this across different scripts. I'd file a bug
 about this, but since I don't use global vars anyway I don't think
 I'll bother.
 
 -- 
 -Mark Wieder
 mwie...@ahsoftware.net


___
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: defining and using globals in an application

2011-07-07 Thread stephen barncard
And if one needs to work with multiple namespaces, you can do what Trevor
and some others do -- create several instances of livecode and run them at
the same time. It's said that one can cut and paste objects between
instances.

On 7 July 2011 09:09, Bob Sneidar b...@twft.com wrote:

 I don't think she said that. I think she is talking about in the dev
 environment. Globals are global to Livecode, not just the stack, assuming
 you declare them in the script or handler. Obviously, in an executable, the
 OS is going to firewall each app from the other, unless you make a way for
 them to communicate with each other.

 Bob


 On Jul 7, 2011, at 8:36 AM, Mark Stuart wrote:

  Jacqueline - are you saying that two different applications (as
  executables or as .rev/.livecode stacks) using the same global name can
  be referenced by one another, and share the same values? That's bizarre.



Stephen Barncard
San Francisco Ca. USA

more about sqb  http://www.google.com/profiles/sbarncar
___
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: defining and using globals in an application

2011-07-07 Thread Nonsanity
On Thu, Jul 7, 2011 at 12:11 PM, Bob Sneidar b...@twft.com wrote:

 I don't think it's a bug IMHO. How can a variable in the same script have 2
 scopes? How would the app know which you were talking about when you used
 it?

 Bob



Ah. Variables don't a have scope, they live inside scopes.

A handler has a scope. If you put 5 into x in a handler, that x won't be
accessible from anywhere else. It was defined inside the scope of the
handler.

A script has a scope. If you use local x at the top of the script, then
all handlers in that script have access to that variable, but no other
script does. The handlers in that script are part of its scope.

The whole LiveCode environment has a scope. Any call of global x will add
x to the global scope. The message box lives inside that scope.

But here's the weird part that confuses many people... Even though all other
scripts can be said to be inside the LiveCode scope they do not have
access to the variables in that scope unless the specifically request access
to one by name with the global keyword. Sux to break the pattern, but
there ya go... :)

 ~ Chris Innanen
 ~ Nonsanity
___
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 up Mac LiveCode apps on an iPad ?

2011-07-07 Thread Francis Nugent Dixon

Hi from Beautiful Brittany,

Mark wrote :


To make apps for your own iPad and keep them running,
you need to pay for the Apple dev programme every year
unfortunately.



My bog mindles, Mark.

Are you saying that :

I BUY an iPad (at least $500)
I BUY a software which enables me to install iOS
apps on MY iPad (at least $99)

and then :

I have to PAY 94 euros and change to Apple for the
privilege of running MY OWN program on MY OWN
iPad - EVERY F***ING YEAR ?

Does this mean that Apple knows when I run apps
on my iPad, and that I haven't coughed up my $99 ?

Or can I just ignore this hilarious Apple rule ?

-Francis

Nothing should ever be done for the first time ! 


___
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 up Mac LiveCode apps on an iPad ?

2011-07-07 Thread Mark Schonewille
Hi Francis,

No, a personal LiveCode license for iOS is not $99 but €94. This is a BIG 
difference. The European LiveCode license is MUCH more expensive than the 
American LiveCode license.

In addition to this, you have to pay an amount for the Apple Developer 
programme every year. I believe that the current price it $79. It is not a huge 
amount, but it isn't free either and you have to pay for it every year. You 
can't ignore this Apple rule. 

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

New: Download the Installer Maker Plugin 1.6 for LiveCode here http://qery.us/ce

On 7 jul 2011, at 19:09, Francis Nugent Dixon wrote:

 Hi from Beautiful Brittany,
 
 Mark wrote :
 
 To make apps for your own iPad and keep them running,
 you need to pay for the Apple dev programme every year
 unfortunately.
 
 
 My bog mindles, Mark.
 
 Are you saying that :
 
 I BUY an iPad (at least $500)
 I BUY a software which enables me to install iOS
 apps on MY iPad (at least $99)
 
 and then :
 
 I have to PAY 94 euros and change to Apple for the
 privilege of running MY OWN program on MY OWN
 iPad - EVERY F***ING YEAR ?
 
 Does this mean that Apple knows when I run apps
 on my iPad, and that I haven't coughed up my $99 ?
 
 Or can I just ignore this hilarious Apple rule ?
 
 -Francis
 
 Nothing should ever be done for the first time ! 


___
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 up Mac LiveCode apps on an iPad ?

2011-07-07 Thread Mark Schonewille
Hi,

I think that getting an Android device is very good advice. 

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

New: Download the Installer Maker Plugin 1.6 for LiveCode here http://qery.us/ce

On 7 jul 2011, at 19:15, J. Landman Gay wrote:
 
 
 You can't install an app without a provisioning certificate, and you can't 
 get the certificate without being part of the developer program.
 
 If you aren't determined to use an Apple product, you could buy an Android 
 device. They are cheaper, and you can install whatever you want on those at 
 no extra cost and without joining any program.



___
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: defining and using globals in an application

2011-07-07 Thread Pete
I opted to go with a combination of the the accessor route as described by
Richard and the array approach described by Stephen.  I have changed the
format of both the array and the contents over time and, as Richard pointed
out, all the code changes to deal with that were limited the Setxxx and
Getxxx  handlers plus the handler that sets up the global values, no change
to the rest of my code.

I use custom properties a lot as well but I use them to store values which
are specific and unique to the function of an object which I don't need to
preserve across runs of an application.  I'm definitely biased because I
tend to work with database applications more than any others but my feeling
is that data that needs to be preserved across runs of an application should
be stored in some sort of database or file external to the application.

All these methods work, it's just a case of which feels more comfortable and
fits your programming style.


Pete
Molly's Revenge http://www.mollysrevenge.com




On Thu, Jul 7, 2011 at 6:38 AM, Richard Gaskin
ambassa...@fourthworld.comwrote:

 Mark Stuart wrote:

 You HAVE to declare the global again, and again where needed.

 I'd rather it once declared and a value put into it, the value be
 available
 elsewhere WITHOUT having to declare it again.


 As Jacque pointed out, LC and related dialects are very forgiving with the
 scope of variable names, so it's possible to have one token used as a
 global, a local, and an argument.  To avoid confusing the compiler, we need
 to declare globals in any script that uses them.

 If that one line of code at the top of a script is cumbersome (and in some
 complex code bases it may well be), try accessors instead:

 -- In a mainstack, library, backscript, or other globally-available
 -- script:
 global gDefaultWidgetHeight

 command SetDefaultWidgetHeight pVal
  put pVal into gDefaultWidgetHeight
 end SetDefaultWidgetHeight

 function GetDefaultWidgetHeight
   return gDefaultWidgetHeight
 end GetDefaultWidgetHeight
 ---

 With those in place you can get and set the value stored in the global from
 any other script without a declaration, e.g.:

  set the height of grp 1 to GetDefaultWidgetHeight()
  SetDefaultWidgetHeight 200

 Another benefit to using accessors is that they help factor code; that is,
 you can change how you store that value at any time without having to modify
 any code that relies on it.  Today it might be a global, but two versions
 from now it might be a database record; with accessors, you only change two
 handlers and everything else comes along for the ride.

 True, using accessors will impair performance relative to calling the
 global directly.  But in practical terms you're only looking at a fraction
 of a *micro*second, so if you need to liberate your code base from direct
 storage references chances are no one will ever notice the performance
 difference.

 --
  Richard Gaskin
  Fourth World
  LiveCode training and consulting: http://www.fourthworld.com
  Webzine for LiveCode developers: http://www.LiveCodeJournal.com
  LiveCode Journal blog: 
 http://LiveCodejournal.com/**blog.irvhttp://LiveCodejournal.com/blog.irv


 __**_
 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-livecodehttp://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 up Mac LiveCode apps on an iPad ?

2011-07-07 Thread Colin Holgate
Some comments:

You only really get six months after you let your subscription expire, because 
that's when the provisioning file runs out.

You could get anyone you know to make the IPA file for you, and to send you a 
new provisioning file every six months.

You could also publish your app to the App Store. Unless it's very secret or 
private, that would give you an app that lasted for ever, and you might even 
make some money if others buy it.



___
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 ungroup a group of one

2011-07-07 Thread Pete
I gotta take a look at that - I find groups, particularly nested groups,
particularly frustrating to to maintain using the IDE.
Pete
Molly's Revenge http://www.mollysrevenge.com




On Thu, Jul 7, 2011 at 12:52 AM, Chipp Walters ch...@chipp.com wrote:

 Slava,

 Chances are it is ungrouped, but just not displaying correctly in the
 Application Browser. Try hitting the refresh button at the bottom of the
 Application Browser tree and the App Browser will show again the current
 group structure.

 This bug is why I wrote the Group Manager plugin for LiveCode:
 http://blog.chipp.com/update-to-group-manager-plugin-for-livecode/

 On Thu, Jul 7, 2011 at 1:35 AM, Slava Paperno sl...@lexiconbridge.com
 wrote:

  I have somehow created a group that contains one object, a button. I
 think
  I
  grouped two objects and then  deleted one of them or something. Anyway,
  this
  group that contains one button is indestructible. Clicking the Ungroup
  button when it is selected, or using the ungroup group id X command
  displays no errors, but the group is still there.
 
  To make it even funnier, that indestructible group is a member of another
  group:
 
  put the name of control 6 of group navigation
  --group UnintendedGroupOfOne
 
  select control 6 of group navigation
  ungroup the selectedObjects
  put the name of control 6 of group navigation
  --group UnintendedGroupOfOne
 
  This defies what the Dictionary says: Use the ungroup command to change
  the
  constituents of a group, or to turn grouped controls into card controls.
 
  Any cure for that?
 
  Slava
 
 
 
  ___
  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
 



 --
 Chipp Walters
 CEO, Shafer Walters Group, Inc.
 ___
 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 up Mac LiveCode apps on an iPad ?

2011-07-07 Thread Nonsanity
Any my experience is that even after a provisioning profile expires, an
installed app will continue to function. But you won't be able to re-install
it, say after an upgrade.

Apple is lacking an economic method of developing iOS apps for personal
in-house use.

 ~ Chris Innanen
 ~ Nonsanity


On Thu, Jul 7, 2011 at 1:29 PM, Colin Holgate co...@verizon.net wrote:

 Some comments:

 You only really get six months after you let your subscription expire,
 because that's when the provisioning file runs out.

 You could get anyone you know to make the IPA file for you, and to send you
 a new provisioning file every six months.

 You could also publish your app to the App Store. Unless it's very secret
 or private, that would give you an app that lasted for ever, and you might
 even make some money if others buy it.



 ___
 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 up Mac LiveCode apps on an iPad ?

2011-07-07 Thread stephen barncard
Remember it's possible to make web-based applications using the right CSS
and sizes that look and work very much like iPad apps, right down to having
it make a launch button on the iPad desktop.  Then you can do anything
without permission from anyone.

On 7 July 2011 10:55, Nonsanity f...@nonsanity.com wrote:

 Any my experience is that even after a provisioning profile expires, an
 installed app will continue to function. But you won't be able to
 re-install
 it, say after an upgrade.

 Apple is lacking an economic method of developing iOS apps for personal
 in-house use.

  ~ Chris Innanen
  ~ Nonsanity


 On Thu, Jul 7, 2011 at 1:29 PM, Colin Holgate co...@verizon.net wrote:

  Some comments:
 
  You only really get six months after you let your subscription expire,
  because that's when the provisioning file runs out.
 
  You could get anyone you know to make the IPA file for you, and to send
 you
  a new provisioning file every six months.
 
  You could also publish your app to the App Store. Unless it's very secret
  or private, that would give you an app that lasted for ever, and you
 might
  even make some money if others buy it.
 
 
 
  ___
  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




-- 



Stephen Barncard
San Francisco Ca. USA

more about sqb  http://www.google.com/profiles/sbarncar
___
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 up Mac LiveCode apps on an iPad ?

2011-07-07 Thread Mark Schonewille
Yes, but Francis wants to use LiveCode, rather than Javascript and CSS.

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

New: Download the Installer Maker Plugin 1.6 for LiveCode here http://qery.us/ce

On 7 jul 2011, at 20:03, stephen barncard wrote:

 Remember it's possible to make web-based applications using the right CSS
 and sizes that look and work very much like iPad apps, right down to having
 it make a launch button on the iPad desktop.  Then you can do anything
 without permission from anyone.


___
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: defining and using globals in an application

2011-07-07 Thread Bob Sneidar
http://en.wikipedia.org/wiki/Scope_(computer_science)

Not to beat a dead horse, but I don't see the difference. I think it's a matter 
of semantics. According to this wiki, a scope can contain statements and/or 
expressions which define an executable algorithm or part thereof; It seems 
like it is saying both procedures and variables are contained in a scope. 
Still, I do not have a degree in computer science and am only a hobbyist. 

My point was, the same variable cannot have 2 scopes, or if you will, be 
contained in two scopes. You can have more than one variable that use the same 
NAME, but not visible to the same handler, because they are in fact two 
different variables in two different memory locations. 

But it is all academic anyway, as the practice of having two variables with the 
same name in the same app is a really bad idea. It only comes into play in the 
dev environment because you can have multiple applications running at the 
same time, and changes to a same named global defined in more than one of them 
will overwrite the value expected by another, and so wreak havoc. 

Bob

 
On Jul 7, 2011, at 9:49 AM, Nonsanity wrote:

 On Thu, Jul 7, 2011 at 12:11 PM, Bob Sneidar b...@twft.com wrote:
 
 I don't think it's a bug IMHO. How can a variable in the same script have 2
 scopes? How would the app know which you were talking about when you used
 it?
 
 Bob
 
 
 
 Ah. Variables don't a have scope, they live inside scopes.
 
 A handler has a scope. If you put 5 into x in a handler, that x won't be
 accessible from anywhere else. It was defined inside the scope of the
 handler.


___
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


Tabs in custom property

2011-07-07 Thread Pete
I don;t seem to be able to type a tab character into a custom property value
in the IDE Property Inspector.  Typing the tab highlights the text before
where the text should be and no tab is inserted.  I can use the message box
to set the cprop value but is there a secret way to type a tab directly into
the custom property value field in the Property Inspector?

Pete
Molly's Revenge http://www.mollysrevenge.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


Re: Tabs in custom property

2011-07-07 Thread Keith Clarke
Pete, 
Try widening your property inspector or testing for tabs with the right-arrow. 
On my Mac, on 4.6.2, I get a tab added but all text selected. If I widen the 
property inspector, it's clear that the new tab character is included in the 
selection. You can also flip the 'show gridlines' option, to check that the tab 
is moving the cursor to the next 'cell'  
Best,
Keith..

On 7 Jul 2011, at 20:04, Pete wrote:

 I don;t seem to be able to type a tab character into a custom property value
 in the IDE Property Inspector.  Typing the tab highlights the text before
 where the text should be and no tab is inserted.  I can use the message box
 to set the cprop value but is there a secret way to type a tab directly into
 the custom property value field in the Property Inspector?
 
 Pete
 Molly's Revenge http://www.mollysrevenge.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


Hide A Stack, But Not Hide A Stack?

2011-07-07 Thread Scott Rossi
Is there any way to hide a stack from the LiveCode IDE while keeping the
stack available to other open stacks?  I'm not referring to visibility, but
rather inclusion in open stack lists.

I have a tool stack which is built for use in the IDE that has a couple of
support stacks it uses for scripts and objects.  Is there any way to hide
the support stacks from such lists as the Application Browser and the Window
menu so that they don't clutter up the user's IDE, but are still available
to my tool stack?

Thanks for any recommendations.

Regards,

Scott Rossi
Creative Director
Tactile Media, UX Design



___
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: Hide A Stack, But Not Hide A Stack?

2011-07-07 Thread Mark Schonewille
Hi Scott,

RunRev precedes stack names with rev to achieve this. You could do the same.

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

New: Download the Installer Maker Plugin 1.6 for LiveCode here http://qery.us/ce

On 7 jul 2011, at 21:38, Scott Rossi wrote:

 Is there any way to hide a stack from the LiveCode IDE while keeping the
 stack available to other open stacks?  I'm not referring to visibility, but
 rather inclusion in open stack lists.
 
 I have a tool stack which is built for use in the IDE that has a couple of
 support stacks it uses for scripts and objects.  Is there any way to hide
 the support stacks from such lists as the Application Browser and the Window
 menu so that they don't clutter up the user's IDE, but are still available
 to my tool stack?
 
 Thanks for any recommendations.
 
 Regards,
 
 Scott Rossi
 Creative Director
 Tactile Media, UX Design
 


___
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 up Mac LiveCode apps on an iPad ?

2011-07-07 Thread stephen barncard
I meant in conjunction with livecode server..

On 7 July 2011 11:13, Mark Schonewille m.schonewi...@economy-x-talk.comwrote:

 Yes, but Francis wants to use LiveCode, rather than Javascript and CSS.

 --
 Best regards,

 Mark Schonewille

 Economy-x-Talk Consulting and Software Engineering
 Homepage: http://economy-x-talk.com
 Twitter: http://twitter.com/xtalkprogrammer
 KvK: 50277553

 New: Download the Installer Maker Plugin 1.6 for LiveCode here
 http://qery.us/ce

 On 7 jul 2011, at 20:03, stephen barncard wrote:

  Remember it's possible to make web-based applications using the right CSS
  and sizes that look and work very much like iPad apps, right down to
 having
  it make a launch button on the iPad desktop.  Then you can do anything
  without permission from anyone.


 ___
 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




-- 



Stephen Barncard
San Francisco Ca. USA

more about sqb  http://www.google.com/profiles/sbarncar
___
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: Tabs in custom property

2011-07-07 Thread Pete
Thanks Keith.  I was on 4.6.0 when I got the problem - I upgraded to 4.6.2
and now it works as you described.
Pete
Molly's Revenge http://www.mollysrevenge.com




On Thu, Jul 7, 2011 at 12:19 PM, Keith Clarke 
keith.cla...@clarkeandclarke.co.uk wrote:

 Pete,
 Try widening your property inspector or testing for tabs with the
 right-arrow. On my Mac, on 4.6.2, I get a tab added but all text selected.
 If I widen the property inspector, it's clear that the new tab character is
 included in the selection. You can also flip the 'show gridlines' option, to
 check that the tab is moving the cursor to the next 'cell'
 Best,
 Keith..

 On 7 Jul 2011, at 20:04, Pete wrote:

  I don;t seem to be able to type a tab character into a custom property
 value
  in the IDE Property Inspector.  Typing the tab highlights the text before
  where the text should be and no tab is inserted.  I can use the message
 box
  to set the cprop value but is there a secret way to type a tab directly
 into
  the custom property value field in the Property Inspector?
 
  Pete
  Molly's Revenge http://www.mollysrevenge.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: Hide A Stack, But Not Hide A Stack?

2011-07-07 Thread Phil Davis
Seems like you might have to do something similar to what the IDE does when you 
set the preference to exclude IDE stacks from those listings (if that's even 
possible with non-IDE code).


Phil


On 7/7/11 12:38 PM, Scott Rossi wrote:

Is there any way to hide a stack from the LiveCode IDE while keeping the
stack available to other open stacks?  I'm not referring to visibility, but
rather inclusion in open stack lists.

I have a tool stack which is built for use in the IDE that has a couple of
support stacks it uses for scripts and objects.  Is there any way to hide
the support stacks from such lists as the Application Browser and the Window
menu so that they don't clutter up the user's IDE, but are still available
to my tool stack?

Thanks for any recommendations.

Regards,

Scott Rossi
Creative Director
Tactile Media, UX Design



___
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



--
Phil Davis

PDS Labs
Professional Software Development
http://pdslabs.net


___
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: Hide A Stack, But Not Hide A Stack?

2011-07-07 Thread Kennan Ray
You could load the stack into memory nut not open it by using the trick: 

get (there is a stack pathToAStack)

This would put it in the mainstacks but NOT in the openStacks.

I think that would hide it from the Windows menu but may not keep it out of the 
Application Browser (I'm not at a computer so I can't confirm that).

Ken Ray
Sons of Thunder Software

On Jul 7, 2011, at 2:38 PM, Scott Rossi sc...@tactilemedia.com wrote:

 Is there any way to hide a stack from the LiveCode IDE while keeping the
 stack available to other open stacks?  I'm not referring to visibility, but
 rather inclusion in open stack lists.
 
 I have a tool stack which is built for use in the IDE that has a couple of
 support stacks it uses for scripts and objects.  Is there any way to hide
 the support stacks from such lists as the Application Browser and the Window
 menu so that they don't clutter up the user's IDE, but are still available
 to my tool stack?
 
 Thanks for any recommendations.
 
 Regards,
 
 Scott Rossi
 Creative Director
 Tactile Media, UX Design
 
 
 
 ___
 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: Hide A Stack, But Not Hide A Stack?

2011-07-07 Thread Pete
Just tried that - it still turns up in the Application Browser (and all its
substacks).
Pete
Molly's Revenge http://www.mollysrevenge.com




On Thu, Jul 7, 2011 at 1:09 PM, Kennan Ray k...@sonsothunder.com wrote:

 You could load the stack into memory nut not open it by using the trick:

 get (there is a stack pathToAStack)

 This would put it in the mainstacks but NOT in the openStacks.

 I think that would hide it from the Windows menu but may not keep it out of
 the Application Browser (I'm not at a computer so I can't confirm that).

 Ken Ray
 Sons of Thunder Software

 On Jul 7, 2011, at 2:38 PM, Scott Rossi sc...@tactilemedia.com wrote:

  Is there any way to hide a stack from the LiveCode IDE while keeping
 the
  stack available to other open stacks?  I'm not referring to visibility,
 but
  rather inclusion in open stack lists.
 
  I have a tool stack which is built for use in the IDE that has a couple
 of
  support stacks it uses for scripts and objects.  Is there any way to
 hide
  the support stacks from such lists as the Application Browser and the
 Window
  menu so that they don't clutter up the user's IDE, but are still
 available
  to my tool stack?
 
  Thanks for any recommendations.
 
  Regards,
 
  Scott Rossi
  Creative Director
  Tactile Media, UX Design
 
 
 
  ___
  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: Hide A Stack, But Not Hide A Stack?

2011-07-07 Thread Bob Sneidar
Try this bit of code: 

on haveMyCake
  eat it too
end haveMyCake

Sorry I couldn't resist. :-)


On Jul 7, 2011, at 12:38 PM, Scott Rossi wrote:

 Is there any way to hide a stack from the LiveCode IDE while keeping the
 stack available to other open stacks?  I'm not referring to visibility, but
 rather inclusion in open stack lists.


___
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: Hide A Stack, But Not Hide A Stack?

2011-07-07 Thread Pete
If you issue a start using command, the named stack doesn't show up in the
IDE, but that would mean moving the support stacks out of the current main
stack
Pete
Molly's Revenge http://www.mollysrevenge.com




On Thu, Jul 7, 2011 at 1:09 PM, Kennan Ray k...@sonsothunder.com wrote:

 You could load the stack into memory nut not open it by using the trick:

 get (there is a stack pathToAStack)

 This would put it in the mainstacks but NOT in the openStacks.

 I think that would hide it from the Windows menu but may not keep it out of
 the Application Browser (I'm not at a computer so I can't confirm that).

 Ken Ray
 Sons of Thunder Software

 On Jul 7, 2011, at 2:38 PM, Scott Rossi sc...@tactilemedia.com wrote:

  Is there any way to hide a stack from the LiveCode IDE while keeping
 the
  stack available to other open stacks?  I'm not referring to visibility,
 but
  rather inclusion in open stack lists.
 
  I have a tool stack which is built for use in the IDE that has a couple
 of
  support stacks it uses for scripts and objects.  Is there any way to
 hide
  the support stacks from such lists as the Application Browser and the
 Window
  menu so that they don't clutter up the user's IDE, but are still
 available
  to my tool stack?
 
  Thanks for any recommendations.
 
  Regards,
 
  Scott Rossi
  Creative Director
  Tactile Media, UX Design
 
 
 
  ___
  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


Using linkText

2011-07-07 Thread Pete
Is there an easy way to set/get the linkText of a chunk of text in a field
other than by script?  I don't think the message box works - if I select the
text then click on the message box, the text is no longer selected - so
right now I have buttons on the card which set and get the linkText of
whatever text is selected at the time.

Pete
Molly's Revenge http://www.mollysrevenge.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


Re: Hide A Stack, But Not Hide A Stack?

2011-07-07 Thread Scott Rossi
Interesting.  I thought start using only enabled scripts, but apparently
objects from the library stack are also available.  And visibility of the
library stacks appears to be limited to the Application Browser (not in the
Windows menu or the openStacks).

@Mark Schonewille -- I've been down the rev prefix path before and found
it problematic for editing, but that might be the best option.

Thanks guys.

Regards,

Scott Rossi
Creative Director
Tactile Media, UX Design



Recently, Pete wrote:

 If you issue a start using command, the named stack doesn't show up in the
 IDE, but that would mean moving the support stacks out of the current main
 stack
 Pete
 Molly's Revenge http://www.mollysrevenge.com
 
 
 
 
 On Thu, Jul 7, 2011 at 1:09 PM, Kennan Ray k...@sonsothunder.com wrote:
 
 You could load the stack into memory nut not open it by using the trick:
 
 get (there is a stack pathToAStack)
 
 This would put it in the mainstacks but NOT in the openStacks.
 
 I think that would hide it from the Windows menu but may not keep it out of
 the Application Browser (I'm not at a computer so I can't confirm that).
 
 Ken Ray
 Sons of Thunder Software
 
 On Jul 7, 2011, at 2:38 PM, Scott Rossi sc...@tactilemedia.com wrote:
 
 Is there any way to hide a stack from the LiveCode IDE while keeping
 the
 stack available to other open stacks?  I'm not referring to visibility,
 but
 rather inclusion in open stack lists.
 
 I have a tool stack which is built for use in the IDE that has a couple
 of
 support stacks it uses for scripts and objects.  Is there any way to
 hide
 the support stacks from such lists as the Application Browser and the
 Window
 menu so that they don't clutter up the user's IDE, but are still
 available
 to my tool stack?
 
 Thanks for any recommendations.
 
 Regards,
 
 Scott Rossi
 Creative Director
 Tactile Media, UX Design
 
 
 
 ___
 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: Using linkText

2011-07-07 Thread Shao Sean
Under the Text menu there is an option Link (or Link Text) you can  
use that while the text is selected..


___
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: Hide A Stack, But Not Hide A Stack?

2011-07-07 Thread Pete
Interesting indeed.  I don't see my library stack in the Application
browser, just in the stacksinuse and mainstacks, but sounds like you see it
in your Application Browser?
Pete
Molly's Revenge http://www.mollysrevenge.com




On Thu, Jul 7, 2011 at 1:46 PM, Scott Rossi sc...@tactilemedia.com wrote:

 Interesting.  I thought start using only enabled scripts, but apparently
 objects from the library stack are also available.  And visibility of the
 library stacks appears to be limited to the Application Browser (not in the
 Windows menu or the openStacks).

 @Mark Schonewille -- I've been down the rev prefix path before and found
 it problematic for editing, but that might be the best option.

 Thanks guys.

 Regards,

 Scott Rossi
 Creative Director
 Tactile Media, UX Design



___
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: Hide A Stack, But Not Hide A Stack?

2011-07-07 Thread Pete
OK, this is definitely odd.  I just double checked and I do not see my
library stack in the LC Application browser.  This is after issuing the
start using command from the preOpenCard handler of the first card in my
application stack.  Using LC 4.6.2 on OS X 10.6.8.  I know the stack is
loaded because my app wouldn't work without it, plus I see it listed in the
mainstacks and the stacksinuse.  What am I doing differently?
Pete
Molly's Revenge http://www.mollysrevenge.com




On Thu, Jul 7, 2011 at 1:56 PM, Ken Ray k...@sonsothunder.com wrote:


  If you issue a start using command, the named stack doesn't show up in
 the
  IDE, but that would mean moving the support stacks out of the current
 main
  stack

 Sorry, Pete... doing a start using loads the stack into memory but it is
 also shown in the App Browser (same as the there is a stack method).

 @Scott: I don't think there's a way to make a stack loaded but not
 visible to LC in some way. Worst case scenario if you knew where the stack
 was that you needed stuff from you could open, grab what you need, then
 close and purge the stack from memory so that it never appears in the LC IDE
 at all.

 Ken Ray
 Sons of Thunder Software, Inc.
 Email: k...@sonsothunder.com
 Web Site: http://www.sonsothunder.com/


  On Thu, Jul 7, 2011 at 1:09 PM, Kennan Ray k...@sonsothunder.com
 wrote:
 
  You could load the stack into memory nut not open it by using the trick:
 
  get (there is a stack pathToAStack)
 
  This would put it in the mainstacks but NOT in the openStacks.
 
  I think that would hide it from the Windows menu but may not keep it out
 of
  the Application Browser (I'm not at a computer so I can't confirm that).
 
  Ken Ray
  Sons of Thunder Software
 
  On Jul 7, 2011, at 2:38 PM, Scott Rossi sc...@tactilemedia.com wrote:
 
  Is there any way to hide a stack from the LiveCode IDE while keeping
  the
  stack available to other open stacks?  I'm not referring to visibility,
  but
  rather inclusion in open stack lists.
 
  I have a tool stack which is built for use in the IDE that has a couple
  of
  support stacks it uses for scripts and objects.  Is there any way to
  hide
  the support stacks from such lists as the Application Browser and the
  Window
  menu so that they don't clutter up the user's IDE, but are still
  available
  to my tool stack?
 
  Thanks for any recommendations.
 
  Regards,
 
  Scott Rossi
  Creative Director
  Tactile Media, UX Design
 
 
 
  ___
  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: Hide A Stack, But Not Hide A Stack?

2011-07-07 Thread Pete
Never mind - I got bitten by the problems of the Application Browser not
always refreshing.  After I hot the refresh button, the library stack turned
up.
Pete
Molly's Revenge http://www.mollysrevenge.com




On Thu, Jul 7, 2011 at 1:56 PM, Ken Ray k...@sonsothunder.com wrote:


  If you issue a start using command, the named stack doesn't show up in
 the
  IDE, but that would mean moving the support stacks out of the current
 main
  stack

 Sorry, Pete... doing a start using loads the stack into memory but it is
 also shown in the App Browser (same as the there is a stack method).

 @Scott: I don't think there's a way to make a stack loaded but not
 visible to LC in some way. Worst case scenario if you knew where the stack
 was that you needed stuff from you could open, grab what you need, then
 close and purge the stack from memory so that it never appears in the LC IDE
 at all.

 Ken Ray
 Sons of Thunder Software, Inc.
 Email: k...@sonsothunder.com
 Web Site: http://www.sonsothunder.com/


  On Thu, Jul 7, 2011 at 1:09 PM, Kennan Ray k...@sonsothunder.com
 wrote:
 
  You could load the stack into memory nut not open it by using the trick:
 
  get (there is a stack pathToAStack)
 
  This would put it in the mainstacks but NOT in the openStacks.
 
  I think that would hide it from the Windows menu but may not keep it out
 of
  the Application Browser (I'm not at a computer so I can't confirm that).
 
  Ken Ray
  Sons of Thunder Software
 
  On Jul 7, 2011, at 2:38 PM, Scott Rossi sc...@tactilemedia.com wrote:
 
  Is there any way to hide a stack from the LiveCode IDE while keeping
  the
  stack available to other open stacks?  I'm not referring to visibility,
  but
  rather inclusion in open stack lists.
 
  I have a tool stack which is built for use in the IDE that has a couple
  of
  support stacks it uses for scripts and objects.  Is there any way to
  hide
  the support stacks from such lists as the Application Browser and the
  Window
  menu so that they don't clutter up the user's IDE, but are still
  available
  to my tool stack?
 
  Thanks for any recommendations.
 
  Regards,
 
  Scott Rossi
  Creative Director
  Tactile Media, UX Design
 
 
 
  ___
  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: Using linkText

2011-07-07 Thread Jim Ault

On Jul 7, 2011, at 1:47 PM, Pete wrote:

Is there an easy way to set/get the linkText of a chunk of text in a  
field
other than by script?  I don't think the message box works - if I  
select the
text then click on the message box, the text is no longer selected -  
so

right now I have buttons on the card which set and get the linkText of
whatever text is selected at the time.

Pete
Molly's Revenge http://www.mollysrevenge.com


I have used the following trick in the past

on closefield
   if the shiftkey is down and the controlKey is down then
   -- and now you have the selection to work with
  repeat until url_OK
 ask ...
error check
   end repeat
   end if
end closefield

Hope this helps

Jim Ault
Las Vegas



___
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: Using linkText

2011-07-07 Thread Pete
Thanks, hadn't noticed that.  But it just seems to make the text a link or
not, no way to specify what the link should be.

Maybe I'm misunderstanding the purpose of linkText.  What I want to do is
have each link go to a specific card in the stack
Pete
Molly's Revenge http://www.mollysrevenge.com




On Thu, Jul 7, 2011 at 1:58 PM, Shao Sean shaos...@wehostmacs.com wrote:

 Under the Text menu there is an option Link (or Link Text) you can use
 that while the text is selected..

 __**_
 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-livecodehttp://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: Using linkText

2011-07-07 Thread Pete
Thanks Jim, I'll give that whirl.
Pete
Molly's Revenge http://www.mollysrevenge.com




On Thu, Jul 7, 2011 at 2:09 PM, Jim Ault jimaultw...@yahoo.com wrote:

 On Jul 7, 2011, at 1:47 PM, Pete wrote:

  Is there an easy way to set/get the linkText of a chunk of text in a field
 other than by script?  I don't think the message box works - if I select
 the
 text then click on the message box, the text is no longer selected - so
 right now I have buttons on the card which set and get the linkText of
 whatever text is selected at the time.

 Pete
 Molly's Revenge http://www.mollysrevenge.com


 I have used the following trick in the past

 on closefield
   if the shiftkey is down and the controlKey is down then
   -- and now you have the selection to work with
  repeat until url_OK
 ask ...
error check
   end repeat
   end if
 end closefield

 Hope this helps

 Jim Ault
 Las Vegas




 __**_
 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-livecodehttp://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: Using linkText

2011-07-07 Thread Ken Ray

On Jul 7, 2011, at 4:14 PM, Pete wrote:

 Thanks, hadn't noticed that.  But it just seems to make the text a link or
 not, no way to specify what the link should be.
 
 Maybe I'm misunderstanding the purpose of linkText.  What I want to do is
 have each link go to a specific card in the stack

All that setting the style of a textrun to link does is to display it as a 
web link and when it is clicked it sends a linkClicked message to the field 
with the first parameter being the text that was clicked. It's up to you to 
trap the linkClicked message and then do something with it.

An alternative method is to set the htmlText of a field to text that includes 
an a href= tag; if you do *that*, the value in href is returned as the 
parameter to linkClicked, NOT the text itself. Consider this HTML chunk:

  a href=TestThis is a test/a

The phrase This is a test will be underlined and clickable, but when you 
click it:

on linkClicked pText
  answer pText
end linkClicked

This would answer Test, not This is a test.

HTH,


Ken Ray
Sons of Thunder Software, Inc.
Email: k...@sonsothunder.com
Web Site: http://www.sonsothunder.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


[SHOUTOUT] Mark Smith

2011-07-07 Thread stephen barncard
I'm trying to reach Mark Smith -- the xtalk coder that came up with the
brilliant audiowaveform and MP3 tagging stacks.
But his last known email bounces.

 Mark - are you out there?

-- 



Stephen Barncard
San Francisco Ca. USA

more about sqb  http://www.google.com/profiles/sbarncar
___
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: Using linkText

2011-07-07 Thread Pete
Thanks Ken.  Seems like linkText is the way to go - it's just awkward to
maintain.  I was hoping there might be something like a right click that
would bring up a dialog to insert the linkText, kinda like you see in a lot
of WYSIWIG html editors.  I guess I could put that together pretty easily.
Pete
Molly's Revenge http://www.mollysrevenge.com




On Thu, Jul 7, 2011 at 3:17 PM, Ken Ray k...@sonsothunder.com wrote:


 On Jul 7, 2011, at 4:14 PM, Pete wrote:

  Thanks, hadn't noticed that.  But it just seems to make the text a link
 or
  not, no way to specify what the link should be.
 
  Maybe I'm misunderstanding the purpose of linkText.  What I want to do is
  have each link go to a specific card in the stack

 All that setting the style of a textrun to link does is to display it as
 a web link and when it is clicked it sends a linkClicked message to the
 field with the first parameter being the text that was clicked. It's up to
 you to trap the linkClicked message and then do something with it.

 An alternative method is to set the htmlText of a field to text that
 includes an a href= tag; if you do *that*, the value in href is returned
 as the parameter to linkClicked, NOT the text itself. Consider this HTML
 chunk:

  a href=TestThis is a test/a

 The phrase This is a test will be underlined and clickable, but when you
 click it:

 on linkClicked pText
  answer pText
 end linkClicked

 This would answer Test, not This is a test.

 HTH,


 Ken Ray
 Sons of Thunder Software, Inc.
 Email: k...@sonsothunder.com
 Web Site: http://www.sonsothunder.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: defining and using globals in an application

2011-07-07 Thread Mark Wieder
Bob-

Thursday, July 7, 2011, 9:11:51 AM, you wrote:

 I don't think it's a bug IMHO. How can a variable in the same
 script have 2 scopes? How would the app know which you were talking
 about when you used it? 

Well, see, that's where I think it's a bug. If there's a global xyzzy
in memory I don't think the compiler should let me use a local xyzzy,
no matter whether I declare the global in the script or not. If you
have a global variable in a script and you try to redeclare it as a
local variable the compiler won't let you do that.

Using the same name for both is a bad idea in the first place, whether
or not you can get away with it.

-- 
-Mark Wieder
 mwie...@ahsoftware.net


___
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: defining and using globals in an application

2011-07-07 Thread Mark Wieder
Jacque-

Thursday, July 7, 2011, 8:57:58 AM, you wrote:

 On 7/7/11 1:07 AM, Mark Wieder wrote:

 Once again, no, it doesn't work that way. Global variables are *never*
 out of scope, so you can *not* have global and local variables with
 the same name.

 You can if you turn off explicitVariables.

No, I did that too. You still can't do this in the same script. The
compiler barfs.

-- 
-Mark Wieder
 mwie...@ahsoftware.net


___
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


Finding the main stack

2011-07-07 Thread Pete
Got a slightly convoluted situation where I need to get hold of the main
stack for an application.

When the app starts up, I issue a start using command to bring in my
library handlers.  I have a libraryStack handler which needs to get hold of
the value of a custom property in the main stack of the handler that issued
the start using command.

I tried using me and the target but they return the main stack of the
library stack, not the calling stack.  Right now, I'm getting around this by
getting hold of the mainstacks property, filtering out the rev stacks and my
library stack and hope that the result leaves one stack - the calling stack.
 However, if there happens to be more than one application's stack in memory
in the IDE, I end up with two or more stack names.

Is there some way to discover the correct main stack in this situation?

Pete
Molly's Revenge http://www.mollysrevenge.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


Re: Finding the main stack

2011-07-07 Thread Terry Judd
You could set a custom property in the library stack when it's brought into
use.

start using stack myLibStack
set the cMainstack of stack myLibstack to the short name of me

Terry...


On 8/07/11 11:12 AM, Pete p...@mollysrevenge.com wrote:

 Got a slightly convoluted situation where I need to get hold of the main
 stack for an application.
 
 When the app starts up, I issue a start using command to bring in my
 library handlers.  I have a libraryStack handler which needs to get hold of
 the value of a custom property in the main stack of the handler that issued
 the start using command.
 
 I tried using me and the target but they return the main stack of the
 library stack, not the calling stack.  Right now, I'm getting around this by
 getting hold of the mainstacks property, filtering out the rev stacks and my
 library stack and hope that the result leaves one stack - the calling stack.
  However, if there happens to be more than one application's stack in memory
 in the IDE, I end up with two or more stack names.
 
 Is there some way to discover the correct main stack in this situation?
 
 Pete
 Molly's Revenge http://www.mollysrevenge.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
 

--
Dr Terry Judd | Senior Lecturer in Medical Education
Medical Education Unit
Faculty of Medicine, Dentistry  Health Sciences
The University of Melbourne




___
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: Finding the main stack

2011-07-07 Thread Jim Ault

Is  'the effective filename of this stack' of any use?
or  the long id of this stack ?

Jim Ault
Las Vegas


On Jul 7, 2011, at 6:12 PM, Pete wrote:

Got a slightly convoluted situation where I need to get hold of the  
main

stack for an application.

When the app starts up, I issue a start using command to bring in my
library handlers.  I have a libraryStack handler which needs to get  
hold of
the value of a custom property in the main stack of the handler that  
issued

the start using command.

I tried using me and the target but they return the main stack  
of the
library stack, not the calling stack.  Right now, I'm getting around  
this by
getting hold of the mainstacks property, filtering out the rev  
stacks and my
library stack and hope that the result leaves one stack - the  
calling stack.
However, if there happens to be more than one application's stack in  
memory

in the IDE, I end up with two or more stack names.

Is there some way to discover the correct main stack in this  
situation?


Pete
Molly's Revenge http://www.mollysrevenge.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


Re: Finding the main stack

2011-07-07 Thread Mark Wieder
Pete-

Thursday, July 7, 2011, 6:12:32 PM, you wrote:

 When the app starts up, I issue a start using command to bring in my
 library handlers.  I have a libraryStack handler which needs to get hold of
 the value of a custom property in the main stack of the handler that issued
 the start using command.

In that case, that sounds like the wrong architecture. My thinking is
that a library stack shouldn't have to have a knowledge of the stack
using it. Otherwise it might just as well be a substack of the
mainstack, and then your troubles are over.

Is there another paradigm you can use other than a custom property of
the stack that uses the library?

-- 
-Mark Wieder
 mwie...@ahsoftware.net


___
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: Finding the main stack

2011-07-07 Thread Pete
I'm beginning to think the same thing.  However the dictionary entry for
the target says it resolves to the object that originally received the
message and since the start using command came from the preOpenCard handler
of a card in the application stack, I took that to mean the card that issued
the start using command.

I can easily get round this by calling the initialise handler from the
original card immediately after the start using command - I was hoping to
make things as simple as possible for the people who want to incorporate my
library into their stacks but I guess one extra line of code is no big deal.
 The custom property holds a list of databases to be opened by the library.

Pete
Molly's Revenge http://www.mollysrevenge.com




On Thu, Jul 7, 2011 at 7:48 PM, Mark Wieder mwie...@ahsoftware.net wrote:

 Pete-

 Thursday, July 7, 2011, 6:12:32 PM, you wrote:

  When the app starts up, I issue a start using command to bring in my
  library handlers.  I have a libraryStack handler which needs to get hold
 of
  the value of a custom property in the main stack of the handler that
 issued
  the start using command.

 In that case, that sounds like the wrong architecture. My thinking is
 that a library stack shouldn't have to have a knowledge of the stack
 using it. Otherwise it might just as well be a substack of the
 mainstack, and then your troubles are over.

 Is there another paradigm you can use other than a custom property of
 the stack that uses the library?

 --
 -Mark Wieder
  mwie...@ahsoftware.net


 ___
 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: defining and using globals in an application

2011-07-07 Thread J. Landman Gay

On 7/7/11 7:53 PM, Mark Wieder wrote:

Jacque-

Thursday, July 7, 2011, 8:57:58 AM, you wrote:


On 7/7/11 1:07 AM, Mark Wieder wrote:



Once again, no, it doesn't work that way. Global variables are *never*
out of scope, so you can *not* have global and local variables with
the same name.



You can if you turn off explicitVariables.


No, I did that too. You still can't do this in the same script. The
compiler barfs.



Right. In some other message in some other universe, I apologized for 
not mentioning scope well enough. I need to get in my time warp stack so 
I can go back and fix that.


--
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


Re: Finding the main stack

2011-07-07 Thread J. Landman Gay

On 7/7/11 10:44 PM, Pete wrote:

I'm beginning to think the same thing.  However the dictionary entry for
the target says it resolves to the object that originally received the
message and since the start using command came from the preOpenCard handler
of a card in the application stack, I took that to mean the card that issued
the start using command.


The target is the object that receives the message, not the one that 
sent it. Your mainstack sent it; the library stack received it.




I can easily get round this by calling the initialise handler from the
original card immediately after the start using command - I was hoping to
make things as simple as possible for the people who want to incorporate my
library into their stacks but I guess one extra line of code is no big deal.
  The custom property holds a list of databases to be opened by the library.


Some of us just put a function into the mainstack script. I use this all 
the time. I got the idea from Richard Gaskin:


function main
  return the short name of me
end main

Then whenever you want to reference the mainstack, you just use main(). 
It also allows you to avoid structures like this in substacks:


  put the short name of (the mainstack of this stack)

--
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