Re: Outlet for Mac Apps

2012-05-30 Thread Richard Gaskin

Peter Haworth wrote:

 On Tue, May 29, 2012 at 2:01 PM, Richard Gaskin wrote:
 That's not Bodega's choice, that's an Apple restriction.
...
 I've seen a few developers offer a light version in the Mac app
 store, with a Pro version at their web site.

 Hi Richard,
 Yes I realise it's Apple's doing that, not Bodega.  I've emailed
 Bodega about the issue but it doesn't seem true to me.

 For example, Coda 2 is available on the Mac App Store.  It's also
 available on the Panic web site, either through the Mac App Store
 or directly from Panic, with the comment that direct purchase is
 For volume licensing, and Mac App Store haters..  The only
 difference listed is no iCloud availability.  I guess it's possible
 that Panic are expected to remit 30% of their web site sales to
 Apple but doesn't seem likley somehow.

My apologies for repeating Bodega's apparently false claim about Mac app 
store exclusivity.


I've since reviewed the Mac app store license terms, and while the NDA 
Apple requires developers to sign prevents us from having a candid 
discussion about its terms, I hope I'm not risking jail to note that I 
was unable to find anything requiring the sort of exclusivity Bodega 
wrote about.


Interestingly, though, I do see a number of developers who offer 
different versions of their products in the app store and on their web 
sites, as you noted with Coda.


For demos, developers have no choice but to post them at their web site, 
since Apple has made it clear that they don't want customers to be able 
to try out a software before paying for it.


But for the full app, I don't know why so many developers like Coda 
offer different versions depending on purchase venue.



I guess Bodega's claim sounded plausible because it makes business 
sense, even if it doesn't make social sense - yet:


Monetarily, it doesn't serve Apple's interests to allow developers to 
use the Mac app store as an advertising venue for products which are 
also available on the dev's web site, perhaps even at a lower cost. 
This just inflates Apple's expenses without ensuring any return.


But socially, it's important that this migration toward bypassing the 
Web be done in stages, weening the Mac audience in carefully measured 
steps over time.


First, the MAS was purely an option.  Slightly more convenient, but no 
penalty for choosing to get software from any other source.


Then Apple added dire warnings with Gatekeeper to all users who choose 
to get their software from independent publishers about how it may 
damage your computer:

http://livecodejournal.com/blog.irv?pid=1329426585.725072

Stigmatizing independent publishing by describing it in the most 
frightening terms possible (never mind that it's how the Mac ecosystem 
has lived well for decades) may be all that's needed to make the MAS the 
only place to get software in the minds of a majority of users.


Will Apple explicitly require exclusivity?

It doesn't make business sense not to, so I would be very surprised if 
we don't see that clause in a new version of the MAS dev agreement 
within a couple years.


The only thing which may prevent that might be antitrust laws, but since 
those don't seem to apply to mobile OSes it'll be very difficult to 
apply it one category without affecting the other.  After all, as form 
factors continue to diversify, what is the difference from a legal 
standpoint?


Attempting such distinction becomes especially difficult in a world 
where Apple is the only major OS vendor that currently provides two 
different OSes for different types of devices, while Microsoft and 
Ubuntu use a unified approach across all form factors.  And more than a 
few believe iOS and OS X will eventually become integrated into a single OS.


So it seems reasonable to suggest one of two outcomes:  either the Mac 
app store will become exclusive for developers who use it, or if 
antitrust laws prevent that then iOS will be pried open by those same 
laws to allow multiple app stores.


If those laws aren't applicable, don't be surprised if continued malware 
activity forces Apple to require that the Mac app store become the 
only way anyone can get software for their computers.


Only a few ol' timers will mind.  The current generation is already used 
to this sort of thing.


--
 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: Upgrade to Lion

2012-05-31 Thread Richard Gaskin

Kay C Lan wrote:


As for SQLite being ubiquitous on moblie devices, in my own opinion it's
due more to it's price, like mySQL and gmail. If people had to pay $5 a
month for the privilege I think suddenly the numbers would shift. Just
because a billion people do, doesn't mean it's the best.


True, but sometimes it works the other way as well.  Like Torvalds says, 
Given enough eyeballs all bugs are shallow.


Consider the power of WebKit, MySQL, the BSD-originated Darwin kernel 
that drives your Mac, and more - all free an open, all performing at 
least on par with many proprietary alternatives.


With the growing ubiquity of FOSS, the value of software is not easily 
measured by the purchase price of a license.  A better measure is the 
number of hours that went into making it.


SQLite is public domain so a great many eyeballs have been looking at 
that code and optimizing it for some time.  It's not perfect, and there 
are no doubt many opportunities for further optimization, but there's a 
reason it's so commonly used.




Earlier this year I took 130 million data points from the gps database and
fed them into my own SQLite and Valentina dbs. Basically I needed to find
the gradient that represented optimum rate of climb. To do this I needed to
locate all hills, sift out those that where downhill rather than uphill,
remove any instance where drafting was a factor and then seasonally, time
of day, compare to extract trends.

The sql statements were not that complex, just a LOT of toing and froing
between LC and the db. I soon abandoned SQLite as it was clear that
Valentina was getting the answers quicker.


Ruslan's genius is noteworthy, but perhaps the smartest decision he made 
with Valentina was to design it using a columnar data store.


Columnar stores are radically different from row-based stores, such as 
most SQL-based implementations use.  For the relatively low cost of some 
additional overhead in updates, columnar stores allow optimized searches 
in ways that row-based system can rarely match.


This page provides a good intro to the differences:
http://en.wikipedia.org/wiki/Column-oriented_DBMS#Benefits

Additionally, the structure of an SQLite DB, particularly the indexing, 
can radically improve performance.  While it's unlikely that it could be 
optimized to beat Valentina, there may be opportunities to speed up the 
SQLite DB to be at least closer to it.




Maybe it has more to do with the speed LC talks to each db. I used the LC
db commands for SQLite whilst I've migrated across to using API calls for
Valentina.


That's another valuable point.  The LC externals API is somewhat limited 
and carries a bit of overhead.  How that plays out with each external 
can't be known unless we were in a position to examine the source of each.




But what about Spotlight where the data is presented in a unknown vast
assortment? I can do a search on 'Borrower' and 'Latitude', because
Spotlight can look into the home inventory and gps dbs. How could Apple
possibly have known that such fields would be added and whether the field
would hold a constant 2 chars or 0-2K chars or a blob of binary. As far as
I know there is limit of 62 dbs which SQLite can attach to. How close is
Spotlight to reaching that limit, I've no clue, but Versions has just added
one more, and as anything approaches it limit, it slows.


While Apple includes SQLite and recommends devs use it for things like 
prefs files, I don't believe they use it for Spotlight.  My 
understanding is that Spotlight uses a proprietary data store.




But I'm often wrong. And I see why, once all these dbs are set-up, indexed
and connected, there should be very neglible processing required to just
keep updating the data.


So it might seem to those of us who use DB APIs but never have to 
implement the driver.  As an exercise I've experimented with crafting a 
variety of data storage schemes from scratch.  It taught me many things 
about the challenges of efficiently supporting both reads and writes, 
but mostly it taught be to appreciate the excellent work so many have 
already done with such things. :)




I'm assured that Linux is a zippier resource dieted OS. Does it have a
variety of SQLite dbs, all interconnected, and keeping track of your every
move?


Linux being a diverse ecosystem, not surprisingly there are many. :)

Debian, Ubuntu, Mint and others use Zeitgeist, and Fedora and its family 
use Tracker:

http://www.linuxforu.com/2011/10/exploring-software-gnome-and-semantic-desktop/

Among other uses, Zeitgeist plays a role in supporting the new HUD in 
Ubuntu, which is sort of like a mix between Spotlight and Quicksilver 
but taken to a deeper level of interoperability:

http://www.youtube.com/watch?v=w_WW-DHqR3c

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp

Re: Export display of Livecode app doesn't work

2012-05-31 Thread Richard Gaskin

Glen, were you able to turn up any answers on this?

Have you been able to find any other app which exhibits similar behavior?

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


Glen Bojsza wrote:


I have two linux machines (A and B)

on Linux machine A I have a Livecode application

on Linux machine B I :

- ssh -X machineA at 192.168.15.6

- launch the Livecode application on machine A but gets displayed on
machine B


When you do this with any other linux applications everything works fine.

With Livecode only the application frame shows up with odd pieces of the
application components (ie buttons or fields).

You can move the mouse over the area which causes some of the other parts
of the Livecode application to show but we never see the entire
application??

This should work flawlessly like all other Linux applications but doesn't.

Is there some setting or configuration that is required?

It seems strange that only Livecode doesn't work.

I appreciate any advice that can explain the issue and better yet solve
it... unless it is another bug.

thanks,

Glen



___
use-livecode mailing list
use-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 put icon to the right of the menu bar?

2012-05-31 Thread Richard Gaskin

Bob Sneidar wrote:

 On May 31, 2012, at 10:16 AM, René Micout wrote:
 I have an application ready to work (a todo list...) and I want
 to trigger the opening of my application by clicking on an icon
 placed in the right side of the menubar (like spotlight, Time
 Machine, wifi, dropbox, etc...)

 Oh! LC has no internal way to do that. You would have to have an
 app compiled in a different language that ran as a service and
 created that menu. You could launch your LC app from that app.
 But unless the menu provides some functionality, like launching
 an updater, or turning on or off some functionality without your
 LC app running, then there is no point to doing that. If all your
 doing is launching your application, it would be just useless menu
 clutter.

 You should probably read up on the UI guidelines Apple puts out.
 There is likely a section for how those mini-menus should function.

I agree, the menu bar is not an app launcher.  For that we have the 
Dock, and LiveCode does provide ways to implement a menu for the Dock 
icon to provide features beyond just opening the app if needed.


Oddly, there seems to be little info in the HIG about how and when one 
should implement menu extras, as Apple calls them, though typically 
they're used to provide access to services that are relevant across all, 
or at least many, application workflows.


For simply opening the app, consider this Dock (but don't have your app 
put its icon there by itself - that'll prevent it from being accepted in 
the app store).


The one note in the HIG I could find on menu extras notes that they're 
not guaranteed to be visible if the monitor isn't wide enough to 
accommodate them with an app that has a lot of menus:

https://developer.apple.com/library/mac/#documentation/userexperience/Conceptual/AppleHIGuidelines/Menus/Menus.html#//apple_ref/doc/uid/TP3356-SW1

The Dock is the way to go for launching.

--
 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: Android: custom prop vs. .txt?

2012-06-01 Thread Richard Gaskin

Ralph DiMola wrote:

 -Original Message-
 Issuing a save command to the stack with the props should take
 slightly longer than writing the data to a file, but with only
 10k the difference will be negligible.

 If you don't need to save often then using custom props will
 provide good efficiency and simple, robust behavior.

 - rg/4w

 On Android the stack is in the engine folder that is read-only.
 It resides in the apk(a zip formatted file). The engine folder
 is virtual and read only. If you want to modify a stack it needs
 to be a separate stack that you move to the documents folder.
 Any file that you want read/write must be moved from the assets
 folder to the documents folder(or SD card).

Good reminder.  SD is by far the preferred option, since there's usually 
much more space available there.


The restriction about saving a stack will also apply if the stack with 
the properties is part of the stack file that is the executable.


My tip on the value of using stack files for data storage assumes that 
the stack file has had its filename property set to an appropriate 
location for writes.


Once that's done, a lot of very convenient name-value-pair programming 
can be done easily and robustly using custom props in stack files.


If the nature of the data requires relationality, then a relational 
database like SQLite will be essential.  But for simple name-value pairs 
it's hard to beat the simplicity and efficiency of custom props.


--
 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: Android: custom prop vs. .txt?

2012-06-01 Thread Richard Gaskin

J. Landman Gay wrote:

On 6/1/12 12:30 PM, Richard Gaskin wrote:


My tip on the value of using stack files for data storage assumes that
the stack file has had its filename property set to an appropriate
location for writes.


I just thought of an interesting possibility: if the stack is included
in the engine folder and a script sets the filename to the documents
folder, will that copy it there?

If someone gets a chance to try this before I do, I'd like to know. Not
that it would be any faster than just using the copy or save stack as
command.


I imagine it would.  I often just clone a template stack and set its 
filename to whatever destination I need, then use the save command.


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


Another 5-out-5 review for LC!

2012-06-01 Thread Richard Gaskin

Macworld UK gave LiveCode a 5-out-of-5-star review:
http://www.macworld.co.uk/mac/reviews/?reviewid=3361007

That's a nice follow-up to LiveCode being voted Best Developer Tool at 
the MacTech conference in November:

http://runrev.com/newsletter/november/issue122/newsletter1.php

Rackin' up the accolades - congrats, RunRev.

--
 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: Hypercard: the missing link to the web

2012-06-02 Thread Richard Gaskin

Colin Holgate wrote:

 On Jun 1, 2012, at 8:06 PM, Kay C Lan wrote:

 Which then brings me full circle to another thread on this List
 about where OS X is headed, and my feeling that '...and a touch
 sensitive screen' will be part of the future OS X requirement.

 I'm less sure about that. Steve Jobs spoke out about how touch
 screens are not the right way to work with desktop machines...

Steve said a lot of things, and frequently did the opposite.  It's part 
of the secrecy culture, not tipping their hand to the competition and 
all that - here's a brief rundown of some of them, including no phone 
and no tablet:

http://www.tuaw.com/2010/05/18/when-jobs-says-no-we-hear-maybe-heres-why/

When Apple launched the iPad Steve said, If you see a stylus they blew 
it, but last month Apple filed a patent application for a stylus:

http://www.engadget.com/2012/05/24/apple-applies-for-stylus-patent/

Like TUAW says, When Steve says 'no', we hear 'maybe'. :)

Tipping their hand is just now how Apple works.


 ...and I've made enough touch screen kiosk applications to know
 that it's tiring to work that way.

Indeed it is, but only for long work sessions and only when the monitor 
is oriented vertically.


ATMS and other kiosks have have revolutionized whole industries with 
touch screens, and for the sort of longer-session workflows we use PCs 
for Asus and others make touchscreen monitors that are designed to be 
either vertically oriented or laid down at a 30-degree angle - very much 
like a drafting table.


The drafting table orientation has been optimal for long work sessions 
for centuries, so it seems inevitable that as computer form factors 
continue to diversify we'll see an increasing number of those.


Windows 7 already includes support for touch gestures, as does Ubuntu 
with UTouch, and as you noted Apple is increasingly supporting touch 
gestures on their desktop as well.


The bigger question is precision:  occupying only a single pixel, the 
action point of a mouse makes it significantly more precise than any 
finger can be.  But that's ultimately a software design issue, not an 
inherent flaw in the nature of touch devices as a whole.


We're seeing an increasing variety of productivity software for touch 
devices, and there's no reason to believe these must be limited to 10 
screens.


Computing devices will get both smaller and larger as form factors 
continue to diversify, with Google goggles leading the way on the small 
end and touch monitors like Asus' leading the way on the large end.


The tablet is not the end of the evolutionary road.  Every form factor 
in current use is best recognized as a transitional technology.


--
 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: Another 5-out-5 review for LC!

2012-06-02 Thread Richard Gaskin

Igor de Oliveira Couto wrote:


Congratulations, RunRev!

On 02/06/2012, at 4:51 AM, Richard Gaskin wrote:


Macworld UK gave LiveCode a 5-out-of-5-star review:
http://www.macworld.co.uk/mac/reviews/?reviewid=3361007


Well deserved!

And, talking about reviews, I came across a rather scathing write-up on LiveCode at the 
very popular MacUpdate site. Because of that negative review, I missed out on 
trying out LiveCode earlier. It is sad to see that LiveCode is rated so poorly in 
MacUpdate, and that other developers, like me, might be missing out on adding a great 
tool to their toolbox.

With this in mind, I ask you guys, that if you have the time and inclination, 
please head over to MacUpdate, register, and give a positive star rating to 
LiveCode.


Thanks for posting that, Igor.

I went to MacUpdate but haven't been able to post because their reg 
system seems to have lost my account (I'm working with their support on 
that).


I was surprised to see that a majority of the comments there were 
negative.  In a few cases the specifics related to not understanding the 
product well, but others were quite valid from the perspective of a new 
user (e.g., no native controls on iOS).  IMNSHO, even the 
misunderstandings could arguably be attributed to the product design, 
since first impressions need to be accounted for in guiding the user.


Once my account is fixed I'll be happy to note my own experiences there, 
but in all fairness I can understand why those who've posted negative 
comments did so.


Of course those of us who know how to use the tool understand that many 
of those aren't preventing us from getting work done, but I can see how 
a quick-glance review of the demo would lead to some of the perceptions 
noted there.


For example, option controls look so very different between how you lay 
them out in the IDE and how they appear in iOS that it's very difficult 
to lay out screens correctly.


Similarly, not getting the metrics for the screen keyboard or Android 
pixel density also makes it difficult to design.


We know those are being addressed, but it's understandable that 
newcomers seeing the product for the first time may find it initially 
daunting.


--
 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: Another 5-out-5 review for LC!

2012-06-02 Thread Richard Gaskin

Lynn Fredricks wrote:


It is unfortunate when there is a system that doesn't allow for vendor
response.

Ive had the experience before where some buyers have used review systems as
a form of blackmail, meaning, they demanded some feature or some special
service, and told that if they didn't get it that they'd trash the product
in a public place.

Consider also, if a competitor or a champion of another product buys yours
in a public venue that works this way, such as the Mac App Store. They can
heap abuse on your product pretty much freely and there is nothing you can
do about it.


Does MacUpdate really have such a restriction?

If so, they're no VersionTracker.  Back before it was gobbled up by 
CNET, VT was da bomb.   Folks might post a bad comment now and then, but 
I could step in to offer an explanation, or not that something's already 
been fixed, and that provided a productive environment.


This MacUpdate restriction just seems prone to competitor abuse.

Has anyone here written MacUpdate about lifting this counterproductive 
limitation?


--
 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: How to increase the textsize of HTMLtext proportional?

2013-07-09 Thread Richard Gaskin

Tiemo Hollmann wrote:

 How would you change the textsize of such a text by keeping the size
 relation of the different chunks of text? Should I look up the
 HTMLtext and manipulate every font size attribute - or is there
 a more straight forward approach, I don't see?

I asked this question here a few years back, and there were many good 
solutions presented, with Malte's being the fastest IIRC:


http://lists.runrev.com/pipermail/use-livecode/2005-July/061750.html


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys


___
use-livecode mailing list
use-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 the or operator with filter

2013-07-11 Thread Richard Gaskin

Roger Eller wrote:

global gCodes
put tList into tGood; put tList into tBad
put PPX,RRY,NNZ into gCodes
-- Keep lines that contain any item of gCodes
filter tGood with (*  item 1 of gCodes  *) or (*  item 2 of gCodes
 *) or (*  item 3 of gCodes  *)
filter tBad without (*  item 1 of gCodes  *) or (*  item 2 of gCodes
 *) or (*  item 3 of gCodes  *)

Perhaps I should just loop through each line checking if it 'contains' one
of the codes instead?


I would do that.

Regex is handy at times, but it's a complex subsystem and notoriously 
slow with complex operators.


I'll bet if you can first run a filter against the left-most column, a 
repeat for each on the remainder would likely be about as fast as you 
can get.


Sometimes repeat for each on the whole thing is faster than filter.

--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

___
use-livecode mailing list
use-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: Chained Behaviors

2013-07-12 Thread Richard Gaskin

Peter Haworth wrote:

Has anyone got any real world examples of the benefits of the new chained
behaviors feature?

I just read the latest newsletter article about them and while I understand
the concept,  I didn't see benefit in the example scenario over a single
behavior with some common logic and a switch statement to handle the logic
specific to each sprite.


It obviates the switch statement.

We could take this question one step back and ask why we'd want 
behaviors at all, when we could just use frontScripts with switch 
statements instead.


But that thought experiment (hopefully) makes the case for behaviors clear.

Nested behaviors simply extend the value of such a mechanism, at long 
last giving xTalk one of the most valuable aspects of OOP:  subclasses.


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

___
use-livecode mailing list
use-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: Chained Behaviors

2013-07-12 Thread Richard Gaskin

John Dixon wrote:

 Richard...

 I hear what you say, but does an xTalk language need to go down this
 road ?... or to perhaps put a direct way... Should an xTalk language
 be going down this road ?... What I am worried about is that there
 are a lot of people jumping on the 'open source' bandwagon... wanting
 to change things for what they see as improvement whilst completely
 forgetting that it is simplicity not complexity that has got xTalk
 where it is today...

Speaking only for myself, what distinguishes LiveCode from the legacy of 
most earlier xTalks is its willingness to grow.


Associative arrays, touch UIs, sockets, repeat for each, is among, 
and perhaps more than anyone would want me to enumerate here -- all 
introduced to the xTalk world in MetaCard/Revolution/LiveCode.


And behaviors too.

But behaviors limited to a single level are almost a tease, as limited 
as comparing HyperCard's backgrounds to LiveCode's groups.


True, HyperCard was easy to learn precisely because of these 
limitations.  Few things are as overwhelming as holding a paintbrush in 
your hand facing a canvas with infinite bounds.  HC put a relatively 
small frame on the canvas it let us work with, and in its way those 
limitations were indeed liberating.


But as we learn and grow over the years, our desires for what we want to 
do with our software grow along with them.  For all the fond memories we 
have of HyperCard, I doubt few would find it satisfying to work with a 
single monochrome window with few control types, no color, no vector 
graphics, no arrays, etc.


I hear what you're saying about the risk of becoming too complex, and I 
agree we should evaluate such proposed extensions very carefully.


But like arrays, nested behaviors are purely optional:  those who don't 
want them are free to never use them, while those who crave them at last 
have them.


Extensions like these preserve the core flavor of the language, while 
extending it in useful ways at the same time.


Key to this delicate balancing act is discretion, knowing when to say no.

Having once had a disagreement with Mark Waddingham over a language 
design issue, my respect for his good judgment in this regard was only 
amplified by that momentary conflict.


In the end what I learned is that he's deeply passionate about 
preserving the essence of xTalk, and as long as there's a mother ship 
playing the role of arbiter of such decisions, I feel we can relax with 
the confidence that we're in good hands.



--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys


___
use-livecode mailing list
use-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: Chained Behaviors

2013-07-12 Thread Richard Gaskin

Richmond wrote:

On 07/12/2013 08:58 PM, Richard Gaskin wrote:

Peter Haworth wrote:

Has anyone got any real world examples of the benefits of the new
chained
behaviors feature?

I just read the latest newsletter article about them and while I
understand
the concept,  I didn't see benefit in the example scenario over a single
behavior with some common logic and a switch statement to handle the
logic
specific to each sprite.


It obviates the switch statement.


And what, pray tell, is wrong with switch statements?


Nothing.  Use 'em where you like 'em.

OOP is a code design issue.  There are countless arguments around the 
'net about the benefits of OOP, and those are probably better than any I 
could come up with because I find myself here in a cognitive bind:  I'm 
unable to understand how one level of behaviors can be seen as valuable 
but multiple levels not seen as adding even more value.


But that's just me.  Whether I can explain why I like 'em or not, I look 
forward to using 'em.


And if instead you prefer one long script with conditionals, you can 
enjoy that too.


Everyone has what they want here.

--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

___
use-livecode mailing list
use-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: Chained Behaviors

2013-07-12 Thread Richard Gaskin

Peter Haworth wrote:

I remember a while back you mentioned the need for a Community Manager
(or something similar) in the open source world.  Is Mark that person then?


As the number of contributors grows, the role of Community Manager can 
be expected to outgrow Mark's availability, so I believe RunRev plans on 
having someone to handle that soon.  But in the meantime, when it comes 
to stewarding the code base, right now Mark is effectively serving that 
role.


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

___
use-livecode mailing list
use-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: positioning stacks off screen in Linux

2013-07-13 Thread Richard Gaskin

Warren Samples wrote:

No, hiding the stack is completely different from moving it to a
location outside the visible display area. For most purposes they serve
the same practical effect, but not necessarily all. At any rate, this is
something that should, if possible, behave the same on all platforms in
order to avoid confusion or unpleasant surprises.


I agree that it should ideally be fixed, provided the GTK APIs allow for 
it (I've been surprised to find some of the things we take for granted 
on other platforms that are just completely absent from GTK, like being 
able to set the windowBoundingRect).


But in the meantime, to keep your project moving forward, it can be 
helpful to explore other options to get the same result.


What's happening in your setup that makes hiding the stack impractical?

--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

___
use-livecode mailing list
use-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: Is there any issue with a file and directory set up that includes a space?

2013-07-14 Thread Richard Gaskin

Ralph DiMola wrote:


Case sensitive file names also burn my a##. It's an accident waiting to
happen. In my humble opinion case sensitive file names is one of those
Looks good on paper type of things.


When I first started using Linux, getting used to case-sensitive file 
systems was very annoying.


But over time I got used to it, and the more I work with servers (where 
Linux dominates as much as Microsoft does on the desktop) I began to 
appreciate the efficiencies of case sensitivity.


Consider what a file system needs to do so be case-insensitive:  for 
every path being referenced a conversion needs to be done, since of 
course the binary representations of MyFile.txt, myFile.txt, 
myFILE.TXT, and myfile.txt are all very different.


On end-user systems the extra clock cycles don't matter much, but with 
servers - and in particular CGIs, since they're born, live, and die 
within the sort span of satisfying an HTTP request - shaving even a few 
clock cycles adds up.


So yes, it's definitely annoying when you're accustomed to file systems 
that do the extra work.


But maybe it helps to just keep in mind that on a server, saving a few 
clock cycles can mean accommodating more visitors before you need to 
consider other scaling options.


And like any other learning process, the more time you spend doing 
server work the more it becomes second nature to consider case 
sensitivity.  For long-time Mac users like me this can take a while, but 
it happens eventually.


One habit many admins have adopted to help is to just always use 
lower-case wherever practical.  It's easier to type, and if done 
consistently requires no memorizing of how you capitalized.


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

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


Re: LC 20% CPU When Idle?

2013-07-14 Thread Richard Gaskin

Mike Kerner wrote:

LC has been sitting here doingsomething for several hours, taking 20%
of my CPU.  The stack I have open does not have any scripts that appear to
be running, the Message Watcher isn't showing anything, so I'm confused.

If I create a new stack, LC goes to nothing.  Adding the same substacks
that this stack does does not jack up the CPU usage.

Any other ideas on how to figure out what is going on?


I'd guess you're running on a Mac and at least one of the stacks has a 
pulsing default button, yes?


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

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


Re: LC 20% CPU When Idle?

2013-07-14 Thread Richard Gaskin

Mike Kerner wrote:

Nothing showing up in pending messages.

No pulsing buttons.  Just a MG stack with a background, navbar and a
button, butI had a push button (that wasn't pulsing).  When I changed
it to a square button, the CPU usage went to zero.  I wonder why a push
button would take so much CPU time.


I can reproduce that with a default button, but not with a standard push 
button.


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

___
use-livecode mailing list
use-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: Managing Long IDs?

2013-07-15 Thread Richard Gaskin

Scott Rossi wrote:

It was just a simple example, but you made me realize I can probably
modify some repeat-for-each functions to use a different delimiter (at
least, I hope repeat-for-each will use the currently set item delimiter).


FWIW, when I try to paste a name for a folder which contains a tab, both 
Win XP and OS X complain and won't let me do it.


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

___
use-livecode mailing list
use-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: QT playback of remote files

2013-07-17 Thread Richard Gaskin
Not sure if this will help, but I've had cases in which setting the 
player's filename to empty in between loading actual remote videos has 
helped.


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

___
use-livecode mailing list
use-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: Anyone have an OPEN SOURCE project as a FTP app?

2013-07-23 Thread Richard Gaskin

Mark Rauterkus wrote:

Wondering if there is an open souce LiveCode Community project to serve as
an FTP client out there?

I tried a freeware FTP thingie the other week and it came with a zillion
ads and tool bar crazy highjacking stuff with the browser and such. Ugly.


The absence of SFTP support makes any file transfer tool in LiveCode a 
non-starter.


Thankfully, for general FTP/SFTP needs there's FileZilla, free, open, 
and ad-free:

https://filezilla-project.org/

--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

___
use-livecode mailing list
use-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: Reliable script to handle selection/drag-and-drop in a list field?

2013-07-23 Thread Richard Gaskin

Peter Haworth wrote:

It looks like this is probably not going to work as a behavior for me since
the field I'm using it on includes mouseUp/Down handlers to handle
situations other than drag/drop, but other than that, this is great, thanks
again.


I wonder if Geoff's script could be revised to use before mouseDown or 
after mouseDown to allow instances to handle the primary forms of 
those messages without interference?


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

___
use-livecode mailing list
use-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: Getting data out of Excel

2013-07-24 Thread Richard Gaskin

Michael Julian wrote:

 I used to be able to just paste, but nowadays (Excel 2011 Mac OSX
 10.7.4) the data come in as a long string, with six spaces where
 a return should be and three where a tab should be.

That seems a silly format, even by Microsoft standards (ever looked at 
the bizarre range of variance among their own CSV export formats? g).


For example, what does the format look like if you happen to have three 
spaces within a cell's data?


If you paste into a text editor do you see the same pattern?

I'm hoping this is some odd anomaly in LiveCode, rather than one of the 
lamest design decisions I've ever seen from a company as occasionally 
smart as Microsoft.


Kay C Lan's suggestion should get you going, but I'd be interested to 
learn if the oddity is on Excel's side or LiveCode's.  If LiveCode, 
please file a bug report.


If it would be more convenient to import the file directly, Currey 
Kenworthy's been working on a nifty library to do that for Excel files - 
I don't see it on his site yet, but here's the link to his announcement 
on this list:

http://lists.runrev.com/pipermail/use-livecode/2012-May/171751.html

And if this is just for internal use, here's an alternative that's both 
free and written by sane people:


https://www.libreoffice.org/

--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys


___
use-livecode mailing list
use-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: [semi OT] setting a subdomain in cPanel / on-rev

2013-07-24 Thread Richard Gaskin

Dave Kilroy wrote:

I've found that after changing the DNS settings it usually takes a few hours
for it to propogate through the Internet although it can take just a couple
of minutes up to over a day.


FWIW, when I was moving some domains between hosts a while back I 
stumbled across this handy site that let's you track DNS propagation 
globally in real time:


http://www.whatsmydns.net/

Mildly useful, and definitely fun. :)

--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

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


Re: [OT] Free Benchmarking Stuff

2013-07-24 Thread Richard Gaskin

Peter M. Brigham wrote:

 Richard Gaskin's old stack 4W_RevBench.rev is helpful here. Allows
 you to compare the speed of two different solutions to a problem.
 I use it periodically when efficiency questions come up.

Thanks for the kind words, Peter.

4W RevBench is available in the Stacks section of RevNet - in the IDE 
see Development-Plugins-GoRevNet


I also added an article to LiveCode Journal that goes into benchmarking 
in a little more detail:


Benchmarking Performance in LiveCode
http://livecodejournal.com/tutorials/benchmarking-revtalk.html

--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys


___
use-livecode mailing list
use-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 LC Server on Dreamhost

2013-07-24 Thread Richard Gaskin

Peter Bogdanoff wrote:

 I see from the Apache website that .htaccess files are not ideal;
 better to change the server main configuration file.

Do you recall what their complaints were?  URL?

--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

___
use-livecode mailing list
use-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 LC Server on Dreamhost

2013-07-24 Thread Richard Gaskin

Peter Bogdanoff wrote:

 You should avoid using .htaccess files completely if you have access
 to httpd main server config file. Using .htaccess files slows down
 your Apache http server. Any directive that you can include in a
 .htaccess file is better set in a Directory block, as it will have
 the same effect with better performance.

 http://httpd.apache.org/docs/current/howto/htaccess.html

Makes sense.  Thanks for the link.

I'll bet the performance difference is pretty low, though, probably not 
even noticeable until you reach a traffic level where moving to a 
dedicated server makes sense for other reasons.


I haven't used a dedicated server at DH myself, but I've used the 
instructions provided in the LiveCode package to set up my own servers 
here and they've worked out well.


What issues did you run into modding the Apache config file?

--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys


___
use-livecode mailing list
use-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: Problems with Padding and the Properties

2013-07-24 Thread Richard Gaskin

Timothy Bleiler wrote:

 When I get the properties of a field, the padding is included but
 appears to be the rect of the field.
 If I try to get the padding of the field directly i.e. get the
 padding of fld 1 - I get the message the object does not have this
 property

 It looks to me like something is a bug but I don't know where the
 error is because I really don't know what the rules are for the
 padding property.

This appears to be a bug, either in the docs or the engine, as this 
example from the Dictionary throws an error:


  set the padding of field 1 to 10

Until this is resolved you may need to specify a text chunk to apply the 
padding to, or use the margins property.


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys


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


Re: [OT] Free Benchmarking Stuff

2013-07-24 Thread Richard Gaskin

Alejandro Tejada wrote:

Now... How could we collect a battery of benchmarks for
stress testing the most commonly used functions, commands,
properties and messages used in the LiveCode platform?


I thought Mark Weider and Jacque were going to write a framework for that?

;)

--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

___
use-livecode mailing list
use-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: relative performance of two dimensional array and in-memory sqlite database

2013-07-25 Thread Richard Gaskin

Dr. Hawkins wrote:

Searching through the archives, I found what would have been my next
question.  The answer being that using :memory: as the filename
opens an sqlite database in memory rather than disk.

That said, has anyone ever looked into the relative performance of
caching data into two-dimensional arrays, and into in-memory sqlite
when it comes time to search?

If I want to do something, say, for all the rows in which squidget 
5, I could loop through ary[row][squidget] and check every one, or I
could SELECT FROM table WHERE squidget5 ORDER BY sqName.

It would seem to make sense that sqlite would be better optimized for
such things than a loop.  (in fact, much of my data manipulation would
be easier in SQL with WHERE than in memory).


I've benchmarked various LC-based disk stores (simple indexed files) to 
SQLite on disk, but not in memory.


Benchmark fetishist that I am, I would of course be interested in any 
definitive findings related to this.


My hunch is that you'll find a lot of depends, in which certain types 
of searches in certain sizes of colunns across certain ranges of record 
numbers are faster in SQLite, others faster with LC arrays, and some 
faster with simple chunk expressions.


I'm frequently amazed at how well repeat for each... with collected 
results collated with put...after performs relative to alternatives.


When we consider the various hash table jumps and offset moves that 
SQLite and arrays need to make to access data, this is perhaps less 
surprising.


For single-access calls, arrays are hard to beat.  But for aggregate 
operations across an entire data set, like a search, repeat for 
each... performs quite admirably.


That said, SQLite offers indexing options that can greatly reduce the 
search space, so for columns with high carindality I'd be surprised if 
any scripted solution could beat it.


But if you need free text searches, I'd wager chunk expressions would 
perform roughly on par with SQLite, possibly besting it, in at least 
some cases (where lines aren't particularly long, or have more than say 
a couple dozen columns).


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

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


Re: [OT] Free Benchmarking Stuff

2013-07-25 Thread Richard Gaskin

Mark Wieder wrote:

Richard-

Wednesday, July 24, 2013, 5:01:37 PM, you wrote:


I thought Mark Weider and Jacque were going to write a framework for that?


Yeah. OK. Whatever.
I posted my RRTest app and framework on revOnline just now.
Have fun.


Dude, you rock!

Alejandro:  Does Mark's contribution seem a good start for what you had 
in mind?


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

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


SoCal LC User Group meeting Thurs., August 1, Pasadena

2013-07-26 Thread Richard Gaskin

The next SoCal LiveCode User Group meeting is happening Thursday,
August 1, at 7PM in Pasadena - details in the LUG section of
the LiveCode forums:

http://forums.runrev.com/viewtopic.php?f=50t=16062

--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

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


Awesome!

2013-07-26 Thread Richard Gaskin
Ben's progress report in the latest newsletter includes some truly great 
additions, coming up faster than I'd thought would happen - thanks RunRev!



   Graphics Library
   Driven by Michael McCreary
   We have been working for some time on moving LiveCode's 2D rendering
   to use Skia, an open source library maintained by Google. The
   initial purpose for this project is to facilitate the rendering
   LiveCode stacks at any scale (Resolution independence). It is
   possible that we'll also see some rendering performance improvements
   but we'll only know once the project is complete.

   Progress report: This project is almost complete. The only remaining
   step is to hook in text rendering. The estimated release date of a
   test version for this is the end of August.


   Resolution Independence
   Driven by Ian MacPhail
   The aim of this project is to take away the need to LiveCode
   developers to do extra work when creating an app that is required
   to run on devices with different screen densities. For example,
   developers who write an app for the iPad2 (1024x768) currently have
   to manually upscale their objects, graphics and images by hand to
   support the iPad3 (2048x1532). With resolution independence,
   LiveCode will perform all this scaling automatically as well as
   selecting the appropriate density of image from your app bundle.
   Users will be able to create an app at one scale and let LiveCode
   scale it up or down to meet to density of the screen of the target
   device.

   Progress report: LiveCode can now display a stack at any scale on
   Mac and iOS! We are busy porting this to all platforms at the
   moment. The final step is to update the image object to select the
   appropriate density of image automatically.
   The estimated release of a test version for this project is the end
   of August.

http://newsletters.livecode.com/july/issue153/newsletter1.php

--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

___
use-livecode mailing list
use-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: keeping track of the open cards for update

2013-07-26 Thread Richard Gaskin

J. Landman Gay wrote:


Using ID is always the quickest way to access anything.


Why is that?

Mark, Monte - have you guys stumbled across how object references are 
resolved in the code base?


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

___
use-livecode mailing list
use-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: keeping track of the open cards for update

2013-07-26 Thread Richard Gaskin

Monte Goulding wrote:
 On 27/07/2013, at 6:15 AM, Richard Gaskin wrote:

 Using ID is always the quickest way to access anything.

 Why is that?

 Mark, Monte - have you guys stumbled across how object references 
are resolved in the code base?


 I haven't really looked into it but it makes sense that an integer
 comparison will be faster than a string comparison. Objects are
 arranged internally as doubly linked lists in the hierarchy of
 objects so to find the actual instance it needs to iterate over the
 objects to find them and compare the id or name to what's being
 looked for.

Yes, I've always believed that name was the slowest option, but it's the 
iteration that made me thinking that ordinal references would be at 
least as fast, and possibly faster since the lookup is ordinal by nature 
anyway but ordinal references require no additional ID comparison.


 There is also the id cache that was introduced a few versions
 ago that keeps track of re-uses of ids and make them faster.

I found that interesting when it first showed up but have been unable to 
come up with a way to benchmark the improved performance.


Anyone here have a sample script that shows off how well ID caching works?

--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys


___
use-livecode mailing list
use-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: keeping track of the open cards for update

2013-07-26 Thread Richard Gaskin

Monte Goulding wrote:
 On 27/07/2013, at 6:38 AM, Richard Gaskin wrote:

 Yes, I've always believed that name was the slowest option, but
 it's the iteration that made me thinking that ordinal references
 would be at least as fast, and possibly faster since the lookup
 is ordinal by nature anyway but ordinal references require no
 additional ID comparison.

 I'm not really sure what you mean by ordinal references.

ordinal = order = button 1, field 4, etc.

--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys


___
use-livecode mailing list
use-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: revOnline and Open Source

2013-07-31 Thread Richard Gaskin

Dr. Hawkins wrote:


On Wed, Jul 31, 2013 at 6:49 AM, Robert Mann rman at free.fr wrote:

On the frontier :: if the name of the author is not specified in the stack,
then it'll be hard to argue against common knowledge.


That just isn't the law.

Not in the US, and AFAIK, not any country subscribing to the Berne convention.

*HOWEVER*, the GPL3 of the community version *DOES* infect executables
created with the community version (it's license requires that the
derivative work have the same license).


FWIW, the inventor of the GPL prefers inherit rather than infect, 
since the GPL is a choice authors can make and infect has negative 
connotations that make that choice sound like an accident.


But this discussion raises a peripheral question:

How does the GPL3 used by the Community Edition affect libraries?

GPL3 distinguishes dynamic linking as not affected, while static 
linking explicitly inherits GPL freedoms.


The AGPL goes one step further to apply to the sort of dynamic linking 
in connections made by clients to servers, but in the LC world that 
usually only affects LiveCode Server and Kevin has already noted that he 
chose not to use AGPL for Server specifically to avoid encumbrance by 
clients.


For desktop LiveCode, can one build a library and license it under the 
GPL3-compatible LGPL for use in proprietary standalones as long as it 
remains a separate stack file?


Conversely, can one build a proprietary library and use it with the 
Community Edition (not password-protected, of course)?


There seems to be much variance over how to define dynamically linked 
and derivative work.


For example, the Wordpress and Drupal project owners have both 
explicitly stated that they believe plugins and even themes constitute 
derivative works and therefore inherit GPL rights and responsibilities.


Yet even within those communities there are some who sell proprietary 
add-ons, to the best of my knowledge without legal intervention.


Where exactly is the line drawn with LC libraries when distributed as 
separate stack files?


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

___
use-livecode mailing list
use-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: revOnline and Open Source

2013-07-31 Thread Richard Gaskin

Thomas McGrath III wrote:

 Copyright Law aside, Isn't revOnline a place to openly 'share' code
 with other users. In fact what other purpose does revOnline perform?
 Doesn't the idea of sharing code openly in a public space enough to
 declare it as public? Or is that presuming too much?

Sharing code is sharing code, but it helps to define the terms under 
which it's shared.  Otherwise we have no way to know if the intention 
was GPL, CC, MIT, public domain, or something else.


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys


___
use-livecode mailing list
use-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: revOnline and Open Source

2013-07-31 Thread Richard Gaskin

Mark Wieder wrote:


Richard-

Wednesday, July 31, 2013, 12:44:18 PM, you wrote:


Sharing code is sharing code, but it helps to define the terms under
which it's shared.  Otherwise we have no way to know if the intention
was GPL, CC, MIT, public domain, or something else.


(Sticking my non-lawyer nose into this) if something isn't explicitly
GPL then it's not GPL, right?


Yes, that's true of any terms:  if you don't declare them, no one can 
know what they are.


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

___
use-livecode mailing list
use-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: revOnline and Open Source

2013-07-31 Thread Richard Gaskin

Peter Haworth wrote:


However, seems like it would be a good idea for RunRev to publish the terms
under which revOnline submissions are accepted so we don't all have to
include our own tcs.


Personally, I very strongly prefer to be free to choose my own license 
for my work.  There are specific implications for GPL, MIT, public 
domain, etc., and I like each for different projects.


I fear it would greatly limit the range of goodies there if we were 
required to limit our uploads to those serving one license's goals.


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

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


Persistent LC server?

2013-07-31 Thread Richard Gaskin
I've been toying with the idea of using one of my VPSes as a cache 
server, with a persistent LC Server instance there able to handle 
queries by returning array values (which is why it needs to be persistent).


I can do this will enough with the GUI version of LC via sockets, but 
I'm not sure how to do this with the faceless LC Server.


Have any of you done anything like this?

--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

___
use-livecode mailing list
use-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: revOnline and Open Source

2013-07-31 Thread Richard Gaskin

Dr. Hawkins wrote:


On Wed, Jul 31, 2013 at 7:31 AM, Richard Gaskin wrote:

Dr. Hawkins wrote:



FWIW, the inventor of the GPL prefers inherit rather than infect, since
the GPL is a choice authors can make and infect has negative connotations
that make that choice sound like an accident.


An inheritance an also be disclaimed . . .

As the author of the seminal Economic paper on the subject, I chose
viral and public quite deliberately.


That's certainly your right, or anyone's right, regardless of any 
academic credentials.


Just the same, terms like viral and infect are unnecessarily 
provocative.




I also wouldn't release or contribute any code to anything under GPL3
(I have under GP2).  The patent gotchas are just to risky.


What are your patent concerns?

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for Desktop, Mobile, and Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

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


Re: Persistent LC server?

2013-07-31 Thread Richard Gaskin

Phil Davis wrote:

So it would be a faceless long-running app, right? Sounds like some
experimentation is needed to see what is possible. Seems like it could
listen to a non-web port and respond to requests there. Do traditional
DB calls go through the web server? If not (and maybe if so) you could
possibly follow their model.


They go through the Web server when the developer cares about security. :)

The trick here is that LC Server is designed to run as a CGI; that is, 
the process is born, lives, and dies in the time it takes to satisfy a 
request.


So what I need to work out is how to launch it and have it sit in a loop 
waiting for communications over a given port.  Probably doable, but 
would be nice if someone had already worked out the gotchas.


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for Desktop, Mobile, and Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

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


Re: revOnline and Open Source

2013-07-31 Thread Richard Gaskin

Monte Goulding wrote:

On 01/08/2013, at 12:31 AM, Richard Gaskin ambassador at fourthworld.com 
wrote:


GPL3 distinguishes dynamic linking as not affected, while static linking 
explicitly inherits GPL freedoms.


I thought it was LGPL that made that distinction.


On further review, I believe you're right.  I got hung up on the phrase 
dynamically linked, having glossed over the rest of this clause from 
Section 1 of GPL3:


   The “Corresponding Source” for a work in object code form means
   all the source code needed to generate, install, and (for an
   executable work) run the object code and to modify the work,
   including scripts to control those activities. However, it does
   not include the work's System Libraries, or general-purpose tools
   or generally available free programs which are used unmodified in
   performing those activities but which are not part of the work.
   For example, Corresponding Source includes interface definition
   files associated with source files for the work, and the source
   code for shared libraries and dynamically linked subprograms
   that the work is specifically designed to require, such as by
   intimate data communication or control flow between those
   subprograms and other parts of the work.

That last sentence seems less about whether it's statically or 
dynamically linked, and more appropriately (it seems to me) about the 
degree to which such files are essential to the core functionality of 
the work.


Thanks for prompting my re-read (so much falls out of one's head after a 
few days in Hawaii g).


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for Desktop, Mobile, and Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

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


Re: revOnline and Open Source

2013-08-01 Thread Richard Gaskin

Kevin Miller wrote:

I think most of the people sharing on revOnline are happy for their ideas
to be used, otherwise they wouldn't have uploaded the stacks. However I do
agree that some legal clarification is a good idea. How about we state
that everything on revOnline is automatically public domain, *unless* the
author of the stack places a clear notice on the stack that declares
copyright and an alternative license of their choice (they can use
whatever they like but only if they say so clearly)?

This is just a suggestion for feedback, not policy yet, so let me know
what you think.


I like it, provided folks understand what public domain means (include a 
simple definition?).


Your proposed solution seems the best of all worlds:  simplicity for 
those who don't care about defining licenses, while allowing those who 
do to choose a license appropriate for their goals.


Gets my vote.

--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

___
use-livecode mailing list
use-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: Persistent LC server?

2013-08-01 Thread Richard Gaskin

Peter W A Wood wrote:
 Richard

 On 1 Aug 2013, at 11:34, Richard Gaskin wrote:

 The trick here is that LC Server is designed to run as a CGI;
 that is, the process is born, lives, and dies in the time it
 takes to satisfy a request.

 It is your choice whether to run LC Server as a CGI or not:

Schulz:LiveCodeServer peter$ cat  hr.lc
?lc
put Hello Richard. No CGI here
?


Schulz:LiveCodeServer peter$ ./livecode-server hr.lc
Hello Richard. No CGI here

 You should be able to run the same code as you would run using the
 Desktop version save for the GUI. I guess the pitfall of this
 approach is that you can only handle one request at a time.

There's a second pitfall, which is critical for my situation:

My goal is to have my program return values from an array.  This would 
mean, of course, that the program instance never quits.


I've been experimenting with key-values stores on disk as an 
alternative, and have the time down to 0.2ms so I may not spend much 
time with this array notion going forward.


Still, there may be other cases where using LC as a faceless daemon may 
be useful, so hopefully one of us will get some time to explore that one 
day.


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys


___
use-livecode mailing list
use-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: exit repeat and nested repeats

2013-08-01 Thread Richard Gaskin

Andrew Kluthe wrote:

How does exit repeat handle nested repeats? Does it exit the parent repeat
if called from a child repeat in two repeats that are nested in a handler?

 repeat for each key sKey in sData
repeat for each key sKey2 in sData[sKey]
   exit repeat
end repeat
 end repeat


Exit repeat exits only the loop that statement is in.

You can exit to handler with exit handlerName, or exit all script 
execution with exit to top.


But if you need to exit a specific repeat structure, you'll have to add 
an exit repeat for each level you want to exit.


At once of the RevCons a few years ago Robert Cailliau proposed adding 
an option to name repeats so we can exit any of them from any level. 
Might be nice to see that one day.


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

___
use-livecode mailing list
use-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: revOnline and Open Source

2013-08-01 Thread Richard Gaskin

Heather Laine wrote:

 Call me naive but.. if you don't want to share your code, why on
 earth would you upload it to revOnline?

There may be many reasons:

- The stack may be a tutorial, and while the code techniques it 
describes may be shareable there may be libraries or other code driving 
the presentation may have been derived from a proprietary work.


- The stack may be a demo of a proprietary work.

- It may contain content which has restrictions on use.

And with those for which the author did intend to share, what exactly do 
we mean by that?  GPL?  Apache?  MIT?  Public domain?  Something else?


Each type of sharing comes with its own rights and responsibilities.

I like Kevin's suggestion of having a default of CC0 unless the author 
specifies their license, as it leaves everyone's options as open as 
anyone might want them.


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys


___
use-livecode mailing list
use-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: Persistent LC server?

2013-08-02 Thread Richard Gaskin

Monte Goulding wrote:

 Hi Richard

 I had a look at the engine code for you and I don't think you will
 get this to work without some modifications to the source. If you
 look at the server implementation of X_main_loop you will see that
 unlike all the other engines that repeatedly do stuff while the
 MCQuit flag is false the server engine just does it's stuff so it
 will naturally quit at the end.

Very interesting.  Thanks for that background.

In your code base exploration have you discovered why the Linux Server 
engine is nearly 50% larger than that non-server Linux standalone engine?


I can't imagine the extra merge functionality alone accounts for all 
that space.



 Is there a reason you couldn't use the -u flag on a regular
 standalone?

None at all.  In fact, I've been using standalones for CGIs for some 
time (I started back when LC Server didn't support stack files as 
libraries).  I've grown to prefer them for many tasks, esp. given my 
habit of including only function calls (rather than complete handlers) 
in my HTML anyway.



 My biggest question though is what event is triggered on the
 persistent server when you request some part of your array?
 LC Server scripts are basically just one big startup handler
 without the handler declaration.

Right.  If I were to pursue this I'd probably write a quasi-event look, 
watching a particular socket.


At the moment, though, I'm on a different path, since I discovered a way 
to make an array-like file I can access elements within from a cold 
start at about 0.02ms per access, fast enough for CGI use.


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys


___
use-livecode mailing list
use-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: this me?

2013-08-08 Thread Richard Gaskin

Timothy Bleiler wrote:

 This is an interesting discussion. For my 2 cents worth, I'm
 currently in favor of 'the effective behavior of me' but I'm
 curious why it's needed.

FWIW I find myself leaning toward scriptObject because it's the least 
like anything else in the language, and needing this is a very unusual 
circumstance, as you note.


I think sometimes we risk usability with the English-like mandate, 
entertaining strings that may be readable in terms of natural language 
but at the cost of skimmability.


Code is often only read once, at the time it's written.  Beyond that, 
it's far more frequently skimmed, scanning blocks for tokens that help 
us hone in on the source of a problem, or the point where we need to add 
an enhancement.


scriptObject stands out visually, and is easy to type.  Extra bonus 
points that this is a relatively rare need so having a truly distinctive 
token doesn't hurt.




English is designed (if we can even use that word for the historical 
accident that is our language) to be used by humans; computers are 
entities too stupid to count past 1.  English is chock full o' 
ambiguities, requiring uniquely human intelligence to parse the context 
to derive the meaning (consider gerunds, for example), and attempting 
that too much risks a lot of processing time and even cognitive load 
(lots of typing, and remembering exactly what form of English-like 
phrase is needed), for minimal benefit.


Array syntax is my favorite example here:  clear and concise, arrays 
bear no resemblance to anything in English, while they have a lot in 
common with other, lower-level, computer languages.  I see that as a 
feature, not a bug, because computer languages serve a very different 
set of goals than human languages.


I'm not advocating we take that to the extreme; I've learned my lesson 
about dot notation g.  I'm merely suggesting we strive for a balance, 
recognizing up front that any computer language will never be truly 
English-like, and that sometimes we have an opportunity for greater 
usability with both writing and skimming when we aim for what works 
simply over what we might imagine is English-like.




Having made that plea for simplicity in programming, please allow me to 
complicate this now:  :)



Taking the idea of scriptObject further, for the 
rarer-but-not-unthinkable need to know all of the objects in an object's 
message path, might we consider extending this further to include:


  the effective scriptObjects of objDescriptor

...which would return a return-delimited list of all objects in the 
message path of objDescriptor?


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys


___
use-livecode mailing list
use-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 on LinkedIn

2013-08-08 Thread Richard Gaskin
LinkedIn is a great resource for professionals, with an audience larger 
than Twitter's and fewer cat pictures than Facebook. ;)


One of LinkedIn's main features is the member profile, where we list our 
skills and interests, and that's where you come in:


It's common among LinkedIn members to include programming languages they 
have expertise in, like JavaScript, PHP, Python, etc.  These languages 
are popular enough that you'll often find yourself prompted to endorse 
someone you know for those skills.


But LiveCode doesn't have as much visibility on LinkedIn, so it almost 
never appears in such prompts - we can change that:


First, be sure to list LiveCode among the skills in your profile.

Second, when you have time you might consider adding that to 
endorsements for other LinkedIn members whose LiveCode skills you respect.


I took a couple minutes this morning to add LiveCode as a skill in 
endorsements to some of the folks I know here.


Unfortunately this can't be done with the prompt LinkedIn presents 
during most browsing of the site, but you can add LiveCode to the prompt 
that appears when browsing someone's profile.


If you keep this in mind when browsing LinkedIn, hopefully we can raise 
awareness of LiveCode in that increasingly useful professional venue.


Also, LinkedIn supports discussion groups, and there are several there 
related to LiveCode.  Just search the groups there for LiveCode and 
you'll find them, including a few regional groups like the one for 
Portland and another for SoCal.


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

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


Re: Handling of final delimter (was Re: this me?)

2013-08-08 Thread Richard Gaskin

Paul D. DeRocco wrote:


From: Ben Rubinstein

...

are there any examples of LC behaviour which are inconsistent with it?


YES. A listbox that has a return at the end of its contents allows the user
to select a blank item following the last visible item. When building up the
contents of the listbox a line at a time, you have to append the line of
text if it is empty, or append a return and the line of text if it is not.
Or, you have to append a line of text and a return each time, then remember
to go back and remove the trailing return if anything was added.


Respectfully, that's a UI control flexibility, not a data processing 
convention.


True, as with other property settings it requires us to be mindful of 
what we set the text to, but there may be times when it can be useful to 
allow the user to select a blank line.



I'm not saying that behavior is necessarily wrong, it's just that there is
some precedent for a return at the end implying an empty line. One third way
to interpret a list would be to say that any trailing stuff that isn't
followed by a delimiter would be ignored entirely. This would be
counterintuitive when the delimiter is a printable character (e.g.,
a,b,c,d would ignore the d), but has some precedent when the delimiter
is a return (some parsers ignore an unterminated last line in a text file).


We all have our pet peeves with any language, whether it's JavaScript or 
LiveCode or even English (the absence of a gender-independent 
third-person pronoun comes to mind).


My favorite annoyance with xTalks is the decision by the HyperTalk team 
to allow some functions to be called as though they're properties - but 
not all.  You can say get the abs of -10 or abs(-10), and you can 
say get offset(l, hello) but not get the offset of l in hello.


Stranger still, the abs function turns out to be an especially good 
example:  it's an abbreviation for which the long form (absolute) is 
not permitted. I kid you not.


And with LiveCode specifically, don't get me started about 
destroyStack. :)


Some of these may be changed over time, but others are too pervasive, 
and the benefits of change less clear.


No programming language is without its gotchas.  In cases where the 
benefit of change is at best debatable, we just have to chalk it up on 
the list of things we have to learn and move on.


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

___
use-livecode mailing list
use-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: Handling of final delimter (was Re: this me?)

2013-08-08 Thread Richard Gaskin

Geoff Canyon wrote:

On Thu, Aug 8, 2013 at 1:34 PM, Richard Gaskin wrote:


My favorite annoyance with xTalks is the decision by the HyperTalk team to
allow some functions to be called as though they're properties - but not
all.  You can say get the abs of -10 or abs(-10), and you can say get
offset(l, hello) but not get the offset of l in hello.

Stranger still, the abs function turns out to be an especially good
example:  it's an abbreviation for which the long form (absolute) is not
permitted. I kid you not.


These are both going to be correctable in a soon-ish time frame if the new
language features meet the spec. (waiting breathlessly)


The latter would be useful, but the former need not be expanded.

IMNSHO, allowing property syntax is a bug, not a feature, so further 
encouraging the growing list of sometimes rules would seem to hamper 
learnability rather than enhance it.


Parentheses aren't evil.  In fact, they serve as a gentle visual 
reminder that a value is being returned in that place.


I know I'm in a minority on this one, so I won't belabor the point 
beyond this post.  But reading the thread here some months back filled 
with glee at the prospect of inventing dozens of new ways to call a 
function or set a property made me cry at the prospect of having to 
teach all that to someone.


If we were to expand the range of functions that can be called with 
property syntax, at some point we'd be faced with those that have more 
arguments than we can gracefully (or certainly intuitively) string out 
into an English-like statement.


And even for those we could accommodate, consider:

  put the offset of l in hello starting at 2

..as an alternative to the delightfully concise:

  put offset(l, hello, 2)

And what happens to the scripter who guesses incorrectly that the 
statement would be:


  put the offset of l in hello beginning with 2

..or:

  put the offset of l in hello beginning with position 2

..or:

  put the offset of l in hello beginning with character 2

..or:

  put the offset of l in hello beginning after character 2

...or:

  put the offset of l in hello beginning with the second character

..or:

  skipping the first 2 characters, how many characters in hello can I 
find l


Who has the time to define all those templates, and how big would the 
engine be that contained them?


Even just putting in the meta-rules that would define such templates 
would be a massive beast, or at least complex enough that, honestly, I'd 
rather see the time spent on other priorities (reliable startTime for 
QT-free media playback anyone?).


As one (possibly irrelevant) example, ever look at how much code is 
needed for something as relatively simple as a Porter stemmer?  The 
necessary meta-rules which could obviate the need to define fixed 
templates would turn stemming into true lemmatization - which is why few 
programs attempt lemmatization, cheating with the crudeness of stemming 
instead.


With LC functions, so simple instead to just say functions require parens.

Sure, you need to know the args, but if you don't know what a function 
is for why would you be using it anyway?


I would caution that attempting to make a system that doesn't require 
learning risks being cumbersome if it's even possible at all.


Some things just requiring learning.  Let's keep the number of things 
that have to be learned small, and the rest will take care of itself.


If remembering argument positions is the challenge, I'd love to see 
named args, like we see with XML attributes:


  offset(searchterm=l searchedText=hello start=2)

Named arguments would have many useful applications, while creating an 
ever-expanding game of hunt-the-parser seems less productive.


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

___
use-livecode mailing list
use-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: this me?

2013-08-08 Thread Richard Gaskin

Geoff Canyon wrote:

On Thu, Aug 8, 2013 at 8:01 AM, Timothy Bleiler wrote:


So, to the extent that it might effect preferences for the syntax, what
are some examples of how this would be used?


This seems similar to the distinction between class and instance methods.

Class methods are often used to store values that all the instances share
in common. In LC, a local variable in the behavior seems like the
reasonable way to handle this. For example, if you are writing Space
Invaders and need to keep track of how many invaders are left, a local in
the behavior script for the invaders would work.

Having the scriptObject would let you store properties on the behavior
object, which might come in handy if you want to save the stack? Not sure.


This raises an interesting question:  What if you don't want to save 
those values?  Or what if the value you want to use is a nested array, 
which is much slower to get in and out of a property than it is from a 
variable?


Once we start down this road, we should consider a directive for 
variable declarations to be used by the class rather than the instance, 
perhaps something like:


scriptObject local MyVar

..or:

local to scriptObject myVar

--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

___
use-livecode mailing list
use-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: this me?

2013-08-08 Thread Richard Gaskin

Monte Goulding wrote:

 On 09/08/2013, at 12:01 AM, Richard Gaskin wrote:

  the effective scriptObjects of objDescriptor

 I like the idea although it's arguably not complicated to parse the
 chain if you need to. Can you elaborate on the difference the
 effective adjective makes to the scriptObjects?

To my eye it distinguishes scriptObject from scriptObjects in a 
useful way, and makes use of the existing effective keyword to note 
that it's dealing with a broader scope, often used to denote inheritance.


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys


___
use-livecode mailing list
use-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: this me?

2013-08-08 Thread Richard Gaskin

Monte Goulding wrote:

 On 09/08/2013, at 6:57 AM, Richard Gaskin wrote:

 To my eye it distinguishes scriptObject from scriptObjects in
 a useful way, and makes use of the existing effective keyword
 to note that it's dealing with a broader scope, often used to
 denote inheritance.

 Hmm if there's no difference then I guess it could just be
 implemented as the scriptObjects and the effective adjective would
 just be ignored as it is with other properties that don't implement
 a difference. That way people could choose to write it or not...

I'm not married to effective; as long as the functionality is there 
I'll be good with whatever Mark Waddingham thinks is best.


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

___
use-livecode mailing list
use-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: Handling of final delimter (was Re: this me?)

2013-08-08 Thread Richard Gaskin

That was some damn fine writing, my friend.

There's too much code floating around for the delimiter behavior to 
change, but your most excellent post earned you a dinner next time 
you're in LA, or at RevLive in San Diego next year.  It would be my 
pleasure.


Yep, xTalk is sometimes funky, like the rest of the imperfect world in 
which it was born.


But like any language, it's the community that makes a language great - 
and I'm glad you're in this one.


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys


Mike Kerner wrote:


We also had this debate on several bug reports at quality.runrev.com, so
you will find much of this hashed out over there, over several bug
reports.  Excuse me while I wax extemporaneously for a moment.


My fellow LiveCoders, I implore you, to reach within your souls and ask
yourselves, are not all commas created equal?  Is a naked comma on front of
a list somehow more important than the lowly little one on the back?  Are
you so jaded by the unwashed masses of C# hackers trying to convince you
that if your language doesn't have a ++ operator it isn't worthy?  No!  It
is a sophisticated, verbose, beautiful and easy-to-read language that will
not allow such abominations as this me to exist without a fight.  It is a
language that has survived almost thirty years and has maintained that
pure, amazing quality that is lacking from almost every other language that
has evolved over that time - it is not a write-only language.  It wants to
be read.  it wants to be updated and modernized.  It doesn't require
anywhere near the number of comments or hacks or tweaks, because so much of
it is self-explanatory.

In light of that, I say to you that it is a language that should not count
an empty item on the front of a list while ignoring the one in the back.
We are not those people.  We are better than that.  We are not so steeped
in tradition and the foibles of those who came before us that we leave them
alone like they are sacred, because the code they wrote on their
black-and-white Mac Pluses, when HyperCard came on a stack of 3-1/2 disks,
is somehow more important than the code we write now.

If someone brand new comes to this list - someone who has never used
LiveCode, or Runtime Revolution, or SuperCard, or HyperCard or any of the
other children or grandchildren of Bill Adkinson - if someone brand new,
who does not value legacy over sanctimony comes to this list, and you
explain to them what a container is, what empty is, what an itemDelimiter
is, and how these tools laugh in the face of type declarations, and show
them ,a, and ask them How many items does that string contain?, what
would they say?  If after they answer, and you show them a, and ask them
the same question, what would they answer then?

Why is it that we treat the items in our lists like they are schleps in a
queue to throw down their hard-earned Benjamins for a Taylor Swift
concert?  Do we not believe in equality?  Do we really believe that a,
and ,a are different?  No.  Today I say to you that every item was
created equal - even the last one.  Our past is imperfect, but our future
can be.  Why is it that an empty item anywhere in a list matters, unless it
is at the end?  It does matter.  It is significant.  It must be counted.

For my part, I frequently run into this issue when I am working with
databases and LiveCode.  SELECT name, address1, address2 is one example
where the developer is begging for trouble, because the last item may very
well be empty, and therefore not worthy of counting.  Yet that is not
nearly as horrible as what would happen if I were to INSERT or UPDATE using
a list, either from a dataGrid or a container.  The errors returned are an
open sore that remind you that not all items are created equal.  Not all
items are significant.  Not all items deserved to be counted.

If we are to continue with this deep, age-old injustice, then I say to you
that the Scots must fix every other command that might somehow be affected
by a blank lasty, and ensure that we are not reminded that trailing blank
items even exist.  The database functions, when faced with SELECT name,
address1, address2 should return an extra comma on the end of the results
when address2 is blank, because even though they do not want to face an
empty last item, I must be on the watch for them, lest the INSERT that
follows breaks my app and leaves me to gnash my teeth on the bitter taste
of being so close, and yet so far.


So, in closing, I simply ask you to say it with me now:

Every comma is significant, even the last one.

--
On the first day, God created the heavens and the Earth
On the second day, God created the oceans.
On the third day, God put the animals on hold for a few hours,
   and did a little diving.
And God said, This is good

Re: this me?

2013-08-08 Thread Richard Gaskin

Monte Goulding wrote:

 On 09/08/2013, at 8:28 AM, Richard Gaskin wrote:

 I'm not married to effective; as long as the functionality is
 there I'll be good with whatever Mark Waddingham thinks is best.

 Careful now... you might end up with:
 the effective this mes ;-)

I should ammend that:  I'll be good with whatever Mark Waddingham think 
is best when he's sober.


:)

At the risk of appearing a sycophant, I've come to trust his judgment on 
such things.   When he's sober, that is.  Though sometimes even when 
he's not.


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys


___
use-livecode mailing list
use-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: Corrupted Stack

2013-08-10 Thread Richard Gaskin

Joe Hamburger wrote:

 This is strange. The stack I'm referring to works fine when
 everything I do is within the stack. However, when I try to
 alter some field data in this stack from a script in another
 stack, LiveCode force quits. I have used several different
 ways to change the data but it quits almost every time.

Strange indeed.  I've found LC surprisingly robost, certainly more so 
than any other xTalk I've used.


If you have multiple cards, can you lock messages and open card 2 of 
that stack?


Can you at least open it without editing the contents of that field?

Have you tried opening it in LC on other OSes?

--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys


___
use-livecode mailing list
use-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: Corrupted Stack

2013-08-10 Thread Richard Gaskin

Joe Hamburger wrote:

 The corrupted stack I'm talking about appears fine. I can open
 any card in it and do whatever I want within the stack. The
 problem arises when I use a script in another stack to alter
 the contents of fields in this stack.
...
 My question is, since I can open the damaged stack, is it safe
 to cut from it and paste it into a new replacement stack? Would
 I be better off to abandon the damaged stack and start completely
 fresh.

Given the general robustness of LC and the specific symptoms being 
limited to editing field contents, my hunch is that you should be able 
to safely copy stuff out into a new stack - except that one field's 
contents, of course.


In fact, you may be able to continue using the stack you have if you can 
at least delete the field's contents, or perhaps the field itself.


But before you do, it may be helpful to write out the field's contents 
to a binary file for review and analysis:


  put fld Whatever into url (binfile: \
specialFolderPath(desktop)/myWeirdData.txt)

It may also be good to save a copy of the errant stack itself for 
further review.


It would be interesting to see if there are non-ASCII characters there. 
 One might expect that NULLs can be problematic, but I've had NULLs in 
fields without crashing.  Maybe some other sequence there is causing the 
engine to go wonky?


Where did the data in the field come from?  Was it all typed, or 
imported from a file made by another program, or pasted?


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys


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


Re: SQLite/LiveCode Issues

2013-08-10 Thread Richard Gaskin

In May 2012, Peter Haworth wrote:

 The SQLite library included with Livecode up to 5.0 is 3.7.4.
 It dates from about 1 1/2 years ago and there have been 7
 major releases of the library since then including several
 enhancements and performance improvements.

 The library includes support for two of the three components
 of the SQLite Full Text Search extension, fts3 and fts4, but
 not ftsaux.  The rtree extension is included in the library
 but is not available because it has to be enabled at compile time.

 SQLite include a load_extension function that provides the capability
 of loading extensions from an external library.  That extension is
 not exposed to Livecode.

Full message here:
http://lists.runrev.com/pipermail/use-livecode/2012-May/171969.html

I stumbled across this while searching the list for info on SQLite, and 
raises an intriguing question:


Now that LC is open source, what would it take to update the SQLite 
version and expose these newer optional features?


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys


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


Turning off rendering VT as a return?

2013-08-11 Thread Richard Gaskin
Before the big field rewrite a couple versions back, any Vertical Tab 
(VT, ASCII 11) characters in a field just rendered as a non-printable 
character.


But after the big field rewrite, VTs are now used as a way to provide 
return-like appearance within a field table, so now VTs have more or 
less the same visual appearance as CR.


IIRC this was explained in the Release Notes for the version this change 
was introduced in, but despite my best effort to alert RunRev most of 
the details describing the new field behaviors are not in the current 
documentation set.


So in short:  Anyone here know how to turn off the rendering of VTs as 
returns so I can see only true ASCII 10s as the line breaks, like I've 
enjoyed for the last 25 years?


TIA -

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for Desktop, Mobile, and Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

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


Re: Handling of final delimter (was Re: this me?)

2013-08-11 Thread Richard Gaskin

Mark Wieder wrote:


1,2,3 -- this contains three items
1,2,3, -- this contains three items
1,2,3,  -- this contains four items


Let's look at those strings from the point of view of what we might 
presume was that of the HyperTalk design team, but besting them by using 
Jacque's suggestion of the more appropriate terminator rather than the 
ambiguous delimiter - here we'll use x for any data that isn't a 
terminator, and | for terminator:


x|x|x -- this contains three items
x|x|x| -- this contains three items
x|x|x|x  -- this contains four items

Once we understand that delimiters are actually terminators, even empty 
items become easily graspable:


x|empty|x|x - this contains four items

...because what we're counting is any chunk that's terminated, either by 
the delimiter or by simply being the end of the string, even those 
elements whose value is empty.


One simple solution would be to add lineTerminator and 
itemTerminator as synonyms for lineDelimiter and itemDelimiter 
respectively, and then the conceptual model fits what the engine does. 
We leave the *delimter tokens in place for us ol' timers, but 
emphasize *terminator for newcomers.


A more complex solution was hinted at in a recent post by Klaus in the 
forum thread on this, in which apparently Mark Waddingham has been 
giving this a good deal of thought and has come up with a solution that 
obviates the issue altogether by introducing true lists, rather than 
just delimited strings, so there are no delimiter characters per se.  I 
believe Lingo is one xTalk derivative that supported true lists, and 
many other VHLLs offer them too.


Personally, I'd like to see both implemented, as each can be very useful 
for different tasks.


If we get both of those (more accurately descriptive tokens and true 
lists), once folks get a chance to use them we can then evaluate the 
usefulness of bifurcating the community code base along the lines of 
those handlers which expect traditional terminators and those which use 
the new delimiter behavior dependent on a global setting.  But I'd wager 
that if we had both very few scripters would be motivated to pursue this 
further. :)


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

___
use-livecode mailing list
use-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: Handling of final delimter (was Re: this me?)

2013-08-11 Thread Richard Gaskin

Mark Wieder wrote:

 Richard-

 Sunday, August 11, 2013, 6:22:47 PM, you wrote:

 x|x|x -- this contains three items
 x|x|x| -- this contains three items

 unless, of course, the trailing space is considered part of the
 string, in which case that last line has four items.

 x|x|x|x  -- this contains four items

Right, which is why I also included this note:

...what we're counting is any chunk that's terminated,
either by the delimiter or by simply being the end of
the string...

This also answers the question of deleting elements from terminated 
strings, since the end of a string is a de facto terminator (there 
simply ain't no more).


So the current engine behavior with deleted items would seem both 
consistent with Jacque's definition and arguably rather efficient by 
removing the unneeded explicit terminator at the end of the string.



 One simple solution would be to add lineTerminator and
 itemTerminator as synonyms for lineDelimiter and itemDelimiter
 respectively, and then the conceptual model fits what the engine
 does. We leave the *delimter tokens in place for us ol' timers,
 but emphasize *terminator for newcomers.

 That's an interesting idea, but in that case I'd suggest that the new
 terms lineTerminator and itemTerminator do the right thing and
 just leave the *delimiter terms to atrophy away.

Exactly.  I was just being kind to the ol' timers. :)

--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys


___
use-livecode mailing list
use-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: Turning off rendering VT as a return?

2013-08-11 Thread Richard Gaskin

Earlier I wrote:

 Before the big field rewrite a couple versions back, any Vertical
 Tab (VT, ASCII 11) characters in a field just rendered as a
 non-printable character.

 But after the big field rewrite, VTs are now used as a way to provide
 return-like appearance within a field table, so now VTs have more or
 less the same visual appearance as CR.

 IIRC this was explained in the Release Notes for the version this
 change was introduced in, but despite my best effort to alert RunRev
 most of the details describing the new field behaviors are not in
 the current documentation set.

 So in short:  Anyone here know how to turn off the rendering of VTs
 as returns so I can see only true ASCII 10s as the line breaks, like
 I've enjoyed for the last 25 years?

After prowling around my hard drive I found that the v5.5.4 docs are the 
most recent I can find which have Release Notes describing the new field 
features.


Among the other critically important information there currently absent 
from the docs is this bit that answers my question:


  Explicit line-breaks in fields (5.5 DP2 – experimental)

  The engine will now interpret a numToChar(11) character in a
  field paragraph as an explicit line- break when the (effective)
  dontWrap of the paragraph is false. This allows multiple ‘lines’
  to be displayed within a single paragraph.

  The formattedText property has been updated to map any explicit
  line breaks to newlines.

  Note that since the vGrid property turns dontWrap on for the
  paragraph, using the line-break char in table paragraphs will have
  no effect.


The Message Box doesn't have its dontwrap set, so there's no way to see 
the natural wrappings of your text there.  As a workaround during 
development I've found you can simply add a field with dontWrap set to 
true and put any data you need to review there instead.


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys


___
use-livecode mailing list
use-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: Turning off rendering VT as a return?

2013-08-11 Thread Richard Gaskin

J. Landman Gay wrote:


On 8/11/13 7:02 PM, Richard Gaskin wrote:


So in short:  Anyone here know how to turn off the rendering of VTs as
returns so I can see only true ASCII 10s as the line breaks, like I've
enjoyed for the last 25 years?


I don't think there's a way to do it outside of a bulk replace with some
other nonprinting character.

I've already had a use for the new visual line breaks, so was glad to
see them. But I don't think they're optional. :( Maybe someone who's
poking around in the engine would consider adding a toggle switch?


In my follow-up I found the answer:

   Explicit line-breaks in fields (5.5 DP2 – experimental)

   The engine will now interpret a numToChar(11) character in a
   field paragraph as an explicit line- break when the (effective)
   dontWrap of the paragraph is false. This allows multiple ‘lines’
   to be displayed within a single paragraph.

   The formattedText property has been updated to map any explicit
   line breaks to newlines.

   Note that since the vGrid property turns dontWrap on for the
   paragraph, using the line-break char in table paragraphs will have
   no effect.

But this raises a question:

In general I love this new ability to have multiple apparent lines in 
one physical paragraph.


However, in my case these are particularly useful in lists with the 
vGrid set, which would give me something closer to HTML-style tables in 
which a given cell can contain multiple lines, e.g.:


  -
  r1item1 | r1item2a | r1item3
  | r1item2b |
  | r2item2c |
  -
  r2item1 | r2item2a | r2item3
  | r2item2b |
  -
  r3item1 | r3item2a | r3item3
  -
  r4item1 | r4item2a | r4item3
  | r4item2b |
  -

So in my case it's showing the VTs when I don't want to see them (for 
which there's a workaround), and not showing them when I do want to see 
them (for which there's apparently no workaround).


I could probably use a datagrid for that layout but in the project I 
need them for most I absolutely must use a single field.


Should we consider a more explicit way to toggle the rendering of VTs, e.g.:

  set the showVerticalTabs of line 4 of fld 1 to true

If this were an explicit attribute of the text run we could maintain 
backward compatibility by having it default to current behaviors, while 
still allowing us to change it when we need to.


Any thoughts on the token name, or the functionality proposes?

I could use this very soon - anyone here want to write it and submit a 
pull request? :)


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

___
use-livecode mailing list
use-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: Handling of final delimter (was Re: this me?)

2013-08-11 Thread Richard Gaskin

Mike Kerner wrote:


Jacque and Richard...
So you're basically thinking we should change words, not the behavior?  Why
not just change the documentation, then?  In the meantime, if the behavior
is to be left alone, there are a variety of functions (especially the
database functions) that have to be fixed to make them work this way.


My own goal here, regardless of its merit or lack thereof, is simply to 
maintain compatibility with 25 years of code which was written to expect 
delimiters to act as terminators.


As such, I wouldn't advocate deprecating the existing tokens, simply 
adding new ones that are clearer, and encouraging folks to use the news 
ones going forward.


That should maintain the functionality of the db libs (and anything else 
ever written) even after the addition of the synonyms.




Also remember that text editors don't behave this way, either.  Empty
CR's at the end of a line still trigger a page break.  That seems far
more correct than having to figure out of a delimiter/terminator should be
significant or not.


LiveCode fields follow the same UI convention, but while the cursor is 
moved to a lower position when you hit the Return key, there still isn't 
any actual data there until you type something; the cursor's position 
allows you to add data, but is not data itself.


I suppose we could consider this a philosophical matter, and as such 
it's likely that there will always be some disagreement about what's best.


But as an old friend likes to say, Best is the enemy of results.

One thing we can all agree on is the recognition that delimiters have 
been used as terminators in xTalks for decades, and all code written to 
date expects this if it deals with delimiters at all.


The proposed stack property seems a good way to avoid bifurcating the 
community code base, and I certainly wouldn't argue if someone takes the 
time to do it.  Mark Wieder seems well motivated; I'd say go for it, 
then everyone gets what they want so long as the default remains as it 
is now.


And there's the rub:  generations of newcomers would still have a 
segment of their population that isn't clear on the notion that 
delimiters are terminators.


So completely independent of anything Mark might do to support those who 
don't like the current implementation, I still feel that more 
descriptive synonyms would be helpful.





Adding a list datatype (and true pointers) would both be great, but one of
the things that has always made xTalk so awesome and amazing is way that
datatypes are generally context-sensitive and implicit nearly everywhere.
It's much less of a world where I have to tell the interpreter/compiler
what I mean, or put .toString() everywhere, and more of it having to do
just that little bit of work for me - in other words, it has to be just a
bit smarter than the table I'm typing at right now.  If, by creating more
defined/restrictive datatypes I'm going more the direction of a traditional
language, then LC loses something that, I believe, makes it extra special
when deciding between it and something like Xojo.


I see true lists like arrays, in the sense that you have to go out of 
your way to load them and use them, but the benefits of doing so are 
compelling enough to be worth the effort.


Like arrays, there are some data representations which just don't lend 
themselves well to delimited strings.


So yes, we should continue to make strings more usable, by whatever 
means.  But I think there's merit in sometimes also considering entirely 
new ways to solve problems.


Which leads us to structsbut that's a story for another thread. :)

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

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


Re: Handling of final delimter (was Re: this me?)

2013-08-11 Thread Richard Gaskin

Mark Wieder wrote:


Jacque-

Sunday, August 11, 2013, 7:25:47 PM, you wrote:

put this is line 1  cr into field 1
put this is line 2  cr  cr after field 1
put the number of lines in field 1
-- but there are actually four lines in field 1.


With x as data and | as the terminator, the above gives us:

x|x|empty|

So if we keep in mind that:

 ...what we're counting is any chunk that's terminated,
 either by the delimiter or by simply being the end of
 the string...

...it still fits the engine's logic.

Chunk expressions are independent of UI conventions; whether items or 
lines we should expect the same rules to apply.


The position of the cursor is not data, merely a function of UI 
conventions for the placeholder where you can begin to add data if you 
choose.


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

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


Issues with minimizing under OS X?

2013-08-12 Thread Richard Gaskin
I have a report from one of my testers of the app's main window not 
being able to be restored when clicking on its icon in the Dock after 
having been minimized.


I've been unable to reproduce this.

I believe the user's system is OS X Mountain Lion (though I don't know 
for sure; awaiting details).


Any of you ever seen anything like that?

--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

___
use-livecode mailing list
use-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: IDE versus MSG Box - Field Tabstops

2013-08-14 Thread Richard Gaskin

Alejandro wrote:

Looks like the IDE expects that Tab Stops
are written like this:
250,330,340,420,500,580,590,600,610,660
not like this:
250,80,10,80,80,80,10,10,10,50

If this is the correct way to write Tab stops
in the IDE, then I expect an error message
but not that the application hangs and crash.

Try by yourself (with no other stack opened)
In a new stack, create a text field and
using the properties palette, set the Tab stops
to: 250,80,10,80,80,80,10,10,10,50

Tell us if your IDE does not hangs and crash.


FWIW, LC recently introduced a new property, the tabWidths, which will 
accept those values.


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

___
use-livecode mailing list
use-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: IDE versus MSG Box - Field Tabstops

2013-08-14 Thread Richard Gaskin

dunbarx wrote:


Richard.
...FWIW, LC recently introduced a new property, the tabWidths, which will
accept those values.

Are you implying that the tabStop list that Alejandro posted is somehow not 
acceptable?


I have to admit that I've had so much going on in my office that I 
haven't followed this discussion in detail.


But I suspect that the problem stems from a feature in the IDE which may 
not have complete error-checking.


The tabstops property requires absolute metrics from the left edge of 
the control; that is, each item is the complete measure from that edge, 
e.g.:


100,150,225

Recognizing how onerous this can be, RunRev recently added the tabwidths 
property to allow us to specify only the widths, without having to add 
up the widths for each value, e.g.:


100,50,75

Perhaps the IDE team recognize this onerousness long before the engine 
team had a chance to address it with the new tabWidths property, and 
wrote the Inspector in a way that effectively allows you to enter what 
we now call tabWidths when setting the tabStops, translating them into 
true tabStop values when the property is actually set in the control.


If that hunch is correct, perhaps certain sequences of values trip up 
that scripted translation, causing the errant behavior noted.


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

___
use-livecode mailing list
use-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: Field Tabstops oddity (was IDE vs MSG...)

2013-08-14 Thread Richard Gaskin

dunbarx wrote:

It seems that when an anomalous string for tabStops is set, LC uses a hybrid of 
tabStops and tabWidths.

I have the following tabStops in a table field (named f55): 20,10,80.

It would appear that the second stop is to the left of the first stop. 
Something similar to this has crashed LC with at least one user. For me, 
though, LC seems to set the first tabStop at 20, then sets a tabWidth of 10, 
and finally the last tabStop at 80.

on mouseUp
   set the tabstops of fld f55 to 20,10,80 -- hybrid tabs
   wait until the mouseclick
  set the tabwidths of fld f55 to 20,10,80 --expands to expected values
end mouseUp

Feature or bug?


I'd say feature, because it's doing exactly what you asked it to do.  If 
you want to set tab widths use the tabWidths property.


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

___
use-livecode mailing list
use-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: IDE versus MSG Box - Field Tabstops

2013-08-14 Thread Richard Gaskin

Geoff Canyon wrote:

On Wed, Aug 14, 2013 at 9:34 AM, Richard Gaskin wrote:

The tabstops property requires absolute metrics from the left edge of the
control; that is, each item is the complete measure from that edge, e.g.:

100,150,225


I've never found this to be the case. I just opened up LC 5.0, created a
field with text and tabs in it, and in the message box typed:

  set the tabstops of fld 1 to 200,100,150,75

No crash, and the text formatted the way I expected. Now if I type in the
message box:

  put the tabstops of fld 1

I get:

  200,300,450,525

Which is exactly what I expected; the first value was taken literally, and
the rest were incremental. For kicks, I tried:

  set the tabstops of fld 1 to 200,100,250,675

and then

  put the tabstops of fld 1

gets me:

  200,300,550,675

Which means that the first value was absolute, the next two relative even
though the third was larger than either of the first two (but not larger
than their sum), and the last, which was larger than the sum of the three
previous, was again absolute.


You really expected the value coming back to be different from what you 
set it to?


If you set the text of a field to Hello, do you expect getting the 
text from the field to yield World? ;)


It seems the engine is being very graceful in allowing both relative and 
absolute values as input for the tabStops, but ultimately the values 
that get stored are the absolute ones.


If that weren't the case it would mean that Mark Waddingham wasted his 
time adding the tabWidth property, and I don't think I've ever seen Mark 
willfully waste his time.


Now I'm wondering what the engine does with values in which each column 
is larger than the last.  That is, if you set the tabstops to this:


100,150,200

...do you get this back:

100,250,450

..or:

100,150,200

?

--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

___
use-livecode mailing list
use-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: IDE versus MSG Box - Field Tabstops

2013-08-14 Thread Richard Gaskin

Looks like we've discovered an inconsistency.

Apparently the engine will treat items in the tabstops as column widths 
if one or more of them is smaller than a preceding item, but if each of 
the items is larger than the last then the value you get back will be 
the same you set it to.


If you wrote code expecting the engine to treat incoming values 
consistently, you risk having unexpected column widths.


So we have to ask ourselves:  now that the engine explicitly supports 
relative values via the tabWidths property, is the sometimes rule for 
setting tabStops a feature or a bug?


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys




On Wed, Aug 14, 2013 at 4:46 PM, Richard Gaskin
ambassador at fourthworld.comwrote:


Geoff Canyon wrote:


On Wed, Aug 14, 2013 at 9:34 AM, Richard Gaskin wrote:


The tabstops property requires absolute metrics from the left edge of the
control; that is, each item is the complete measure from that edge, e.g.:

100,150,225



I've never found this to be the case. I just opened up LC 5.0, created a
field with text and tabs in it, and in the message box typed:

  set the tabstops of fld 1 to 200,100,150,75

No crash, and the text formatted the way I expected. Now if I type in the
message box:

  put the tabstops of fld 1

I get:

  200,300,450,525

Which is exactly what I expected; the first value was taken literally, and
the rest were incremental. For kicks, I tried:

  set the tabstops of fld 1 to 200,100,250,675

and then

  put the tabstops of fld 1

gets me:

  200,300,550,675

Which means that the first value was absolute, the next two relative even
though the third was larger than either of the first two (but not larger
than their sum), and the last, which was larger than the sum of the three
previous, was again absolute.



You really expected the value coming back to be different from what you
set it to?

If you set the text of a field to Hello, do you expect getting the text
from the field to yield World? ;)

It seems the engine is being very graceful in allowing both relative and
absolute values as input for the tabStops, but ultimately the values that
get stored are the absolute ones.

If that weren't the case it would mean that Mark Waddingham wasted his
time adding the tabWidth property, and I don't think I've ever seen Mark
willfully waste his time.

Now I'm wondering what the engine does with values in which each column is
larger than the last.  That is, if you set the tabstops to this:

100,150,200

...do you get this back:

100,250,450

..or:

100,150,200

?

--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  
http://twitter.com/**FourthWorldSyshttp://twitter.com/FourthWorldSys


___
use-livecode mailing list
use-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: IDE versus MSG Box - Field Tabstops

2013-08-14 Thread Richard Gaskin

Geoff Canyon wrote:

On Wed, Aug 14, 2013 at 6:02 PM, Richard Gaskin wrote:

...

If you wrote code expecting the engine to treat incoming values
consistently, you risk having unexpected column widths.

So we have to ask ourselves:  now that the engine explicitly supports
relative values via the tabWidths property, is the sometimes rule for
setting tabStops a feature or a bug?


It's not a sometimes rule -- it's determinative, and it's a feature.

1. Item 1 of the tabstops is always absolute.
2. If the absolute position of item N of the tabstops  item (N + 1) of the
tabstops, item (N + 1) is taken as relative (added to the absolute position
of item N).
3. After the last tabstop (item F), additional tabstops are added at
intervals of item F - item (F - 1) -- or simply item F if there is only one
item in the list -- until the field runs out of room.


1 and 3 and always consistent, but 2 simply says that sometimes the 
values are treated as absolutes and other times as relative.


In brief, code that expects the values to be treated consistently will 
at some point fail if those values have sufficient freedom of range.


This is presumably why tabWidths was added, and apparently they forgot 
to close this hole with the older token.


But before I file a bug report, let's see if it's worth the time:  has 
anyone ever had code that produced unexpected/unwanted results from this 
inconsistent treatment of the input values of tabStops?


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

___
use-livecode mailing list
use-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: IDE versus MSG Box - Field Tabstops

2013-08-15 Thread Richard Gaskin

Geoff Canyon wrote:

 To me, this is very much like the following, which works:

   put test into x
   put z before char 7 of x
   put x -- puts testz

 There is no character 7 of x. The length of x is 4 (and then 5,
 obviously). The engine takes an unexpected input and interprets it in
 a sensible, predictable, and useful way. Interestingly, this does
 something quite different:

   put 1,2,3 into x
   put 4 before item 7 of x
   put x -- puts 1,2,34

 In this case, since empty items are possible, the list is padded to
 make the command possible in a stricter sense than what was possible
 with characters. I doubt I'm demonstrating anything obscure here, but
 I'm trying to illustrate one of the beautiful things about LC: in many
 circumstances, it simply does the right thing, even when given
 potentially counterintuitive input. I'd hate to lose that.

Did you mean to post that in reply to the other thread on delimiters? 
Neither of those examples are of tabStops.


The tabStops issue is distinguished from those by one key principle:

Whether we prefer the behavior those examples exhibit or not, the 
behavior is consistently applied, regardless of the values in the data 
being acted on.


But with tabStops, the behavior differs with different data.

That's a big ouch, making it impossible to write a handler which can 
reliably automate the setting of tabStops if the range of values is 
sufficiently dynamic.


Sure, it's been around for a long time.  So has destroyStack, which 
doesn't destroy a stack.  I think the world of Dr. Raney, but I think 
he'd be the first to say that sometime he took short cuts (ever hear the 
one about how the boundingRect property was first implemented in a 
different order from all other rects in the language?).


In this case, the convenience once offered by having this one token 
crudely attempt to serve two different goals was fixed with tabWidths, 
which supports relative offsets consistently and reliably.


That said, I agree here with the one thing this has in common with the 
delimiter thread:


 Further, I think all the arguments against changing the behavior of
 the terminating itemdelimiter apply here as well: given the long
 history of this behavior, changing it is risky for existing code.

I seem to be in a minority when it comes to changing the behavior of 
tokens that have been in the language for a long time, but it's 
encouraging to see that number growing.


As I noted earlier:

   But before I file a bug report, let's see if it's worth the time:
   has anyone ever had code that produced unexpected/unwanted results
   from this inconsistent treatment of the input values of tabStops?

So far we've only heard from Peter on this.  Maybe there are others, but 
maybe there aren't.


There are enough dumb things in the language that I don't think anyone 
wants to see RunRev take time away from more critical things to address 
them all.


So I won't file this as a bug report until there's evidence that it's as 
problematic in practice as it is in theory.  And even then, there's 
certainly no reason to believe that if I did file a bug report anyone 
would bother with it in light of the bigger goals they're working on 
right now.


If it's a problem it can be fixed.  And if it's not a problem this 
thread will die a natural death. :)


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for Desktop, Mobile, and Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

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


Re: IDE versus MSG Box - Field Tabstops

2013-08-15 Thread Richard Gaskin

Geoff Canyon wrote:

On Wed, Aug 14, 2013 at 5:46 PM, Richard Gaskin wrote:


If that weren't the case it would mean that Mark Waddingham wasted his
time adding the tabWidth property, and I don't think I've ever seen Mark
willfully waste his time.


Before you worry too much about how Mark spends his time ;-)

I wrote this behavior in about five minutes, so I can't image it took him
any longer than that, even working in C.

setProp xTabWidths X
   -- sets the tabStops of the target based on a set of tabWidths
   repeat for each item i in X
  add i to T
  put T  comma after S
   end repeat
   set the tabStops of me to char 1 to -2 of S
end xTabWidths

getProp xTabWidths
   -- returns the tabWidths of the target
   put 0 into LT
   repeat for each item i in the tabStops of me
  put (i - LT)  comma after W
  put i into LT
   end repeat
   return char 1 to -2 of W
end xTabWidths


Mark already spent his time on that: rather than require us to write 
scripts to get consistent behavior from tabStops, we can now use the 
tabWidths property.


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

___
use-livecode mailing list
use-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: IDE versus MSG Box - Field Tabstops

2013-08-15 Thread Richard Gaskin

Geoff Canyon wrote:


On Thu, Aug 15, 2013 at 1:20 AM, Richard Gaskin wrote:

...

The tabStops issue is distinguished from those by one key principle:

Whether we prefer the behavior those examples exhibit or not, the behavior
is consistently applied, regardless of the values in the data being acted
on.

But with tabStops, the behavior differs with different data.

That's a big ouch, making it impossible to write a handler which can
reliably automate the setting of tabStops if the range of values is
sufficiently dynamic.



I don't know what you mean by , can you give me an example?


I provided one several posts ago yesterday:
http://lists.runrev.com/pipermail/use-livecode/2013-August/191423.html


I still don't understand why you use words like crudely.


Apparently the keepers of the engine agree there's a better way to 
handle relative column width specs, having taken the time to provide the 
tabWidths property.


It's clear we both feel differently about this, and for backward 
compatibility I'm inclined to agree that we should keep this token as is 
unless we can find more than one person who's been adversely affected by it.


I just find it odd, as much as I find destroyStack and being able to 
use property syntax for some functions but not others odd.


Ultimately Mark makes the final call on such things, and having already 
provided an alternative to tabStops that's both more convenient and more 
consistent, I'm disinclined to pursue this further.


Peace, my friend.  In matters of taste there can be no dispute.

-
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

___
use-livecode mailing list
use-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: Tabstops (was IDE Vs MSG box)

2013-08-19 Thread Richard Gaskin

Peter Haworth wrote:

The original thread touched on a lot of interesting issues regarding
tabstops/tabWidths and how they are entered/interpreted.  Carrying on form
there, is it time to think about adding the functionality of right and
centered tabs to tabstops/widths/some other construct, now that we're in
the open source world?  I've often wished LC had that capability,
especially when working with table fields.


A tabAlign property is reserved in the engine, slated for implementation 
at a future date.  At one time it appeared that might be soon, but I 
don't recall seeing it on the roadmap so I have no idea where that falls 
in their priorities at this time.


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

___
use-livecode mailing list
use-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: Control From Outside

2013-08-19 Thread Richard Gaskin

Mike, these tips for implementing CLI support in a standalone may help:

http://lists.runrev.com/pipermail/use-livecode/2013-April/186750.html

--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

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


Re: LC server experience return anyone ?

2013-08-19 Thread Richard Gaskin

jbv wrote:


Several years ago (before on-rev was available) I had a similar setup
using a metacard engine. Things were fine, although we experienced a
couple of problems :
- communication between the engine and mySQL was quite slow, especially
with large amounts of data, and I found out that I'd better ask mySQL to
write the results of a SELECT command as a file and then read the file in
a mc script
- at times the engine would choke mainly because of memory overhead on
heavy tasks.

I guess several people on this list are using LC server on their own
servers, so I'd welcome any useful advice on the best path to follow...


I've used both LC Server and LiveCode-based Linux standalones as CGIs on 
shared servers, VPSes, and dedicated servers.


Performance has been very good overall, though I should note that I have 
yet to use MySQL with LC Server in a production environment.


To a (likely very) small degree, some of the slowdown may be related to 
the overhead inherent in the externals API.  Going from Apache to LC to 
the externals to the drivers to the MySQL server and back again means a 
fair bit of overhead.


However, while I haven't done any benchmarking on that my hunch is that 
the overhead there is minor.


It seems far more likely that any noticeable lag comes from the load of 
other users, either on the web server itself or the MySQL server 
(assuming that the On-Rev uses a separate server for the DB as most 
shared hosts do).


Before dropping $100/mo on a dedicated server, it may be worthwhile 
testing performance on a VPS, which is generally much cheaper (VPSes 
start as low as $6/mo at InterServer.com).


Most VPS implementations won't give you the performance of a dedicated 
machine, but for testing that's useful because if you see good 
performance in a VPS you know it's going to be that much faster in a 
dedicated server.


The one thing a VPS will provide is a more thorough job of isolating 
your processes from others', which can be helpful for identifying 
bottlenecks.


Perhaps even better would be to set up a test server in your office, 
using any PC you have lying around unused.  Installing Ubuntu Server 
takes only a few minutes; you'll likely spend more time configuring your 
Apache config files for the LC CGI (time leveraged when you later move 
to a production machine).


I use a small-form-factor barebones here as a local test server, which 
is cheap to buy, easy to add RAM and HD/SSD, and allows me to test 
everything completely independently of external network latency and of 
course other users.


It's also been a great way to learn about basic server admin tasks, and 
it's always a joy to review the logs to find what a great job Ubuntu's 
default firewall does with rejecting the many spambot attacks every 
server gets all day long. :)


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

___
use-livecode mailing list
use-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 on-rev is about to ruin our business

2013-08-19 Thread Richard Gaskin

jbv wrote:
...
 Recently someone praised the on-rev team for reacting quickly
 everytime something goes wrong with the servers, but yesterday
 mySQL has been down on thor from the early morning and despite
 the 2 urgent support requests I've sent, the server went up again
 around 4:30pm only...
 I thought it was a 24/7 service...
 I've almost lost a full day of work, which already happened during
 last week...
 And a new client of ours (for whom we rushed to complete a new app
 last week) had planed to use the last 3 days to enter all data in her
 DB for the grand opening of her new store today, but couldn't
 complete the work because of yesterday's problems and finally she's
 wondering if she chose the right people for her project...
 And thor just stalled again...
 And a couple of days ago thor went off so many times that I had to
 cancel a software demo with a potential new client who will probably
 never call us again...
...
 Sorry for the bitter tone of this post, but I'd wish everything was
 working now as fine as
 it used to work for the first 2 years I've been using on-rev...
 Does anyone have any idea why this service has become so bad during
 the past few months ?

Web hosting is a very difficult business, because it's both very 
demanding in terms of experience and resources (both machine and human), 
and returns very low margins.  This makes hosting a numbers game, where 
only those hosts that can bring in sufficiently large numbers of 
customers can get the ROI needed to cover the high costs of such a service.


As such, we've seen significant consolidation in that market over the 
last decade, with most seeming new companies being really just resellers 
for others' infrastructure - a great solution that can raise levels of 
service over commodity hosting while retaining the benefits of a large 
company's infrastructure.


When On-Rev started it was hosted at ThePlanet.com, at the time a large 
host in Texas with a good reputation, so it seemed the plan was at least 
somewhat promising, depending on the degree to which RunRev had 
ThePlanet providing support for the systems.


The Data Center page for On-Rev describes an infrastructure which 
would seem to represent a good baseline for any professional hosting 
service, with multiple redundant T1s, multiple on-site generators, etc.:

http://on-rev.com/hosting/our-data-center/

But now absent from that page is a link to the primary hosting company 
itself, where it used to link to ThePlanet.


RunRev described some time ago that they were moving some materials to 
new servers in response to the massive increase in traffic they're 
seeing as a result of going FOSS.


It's unclear to me whether those server migrations were limited to the 
systems they use internally (their web site, mail server, etc.), or 
whether they also moved the On-Rev servers as well.


Going to theplanet.com today redirects to softlayer.com, where we find 
info on that company's recent acquisition by IBM, and where the range of 
services offered seems more cloud-specific, rather than general hosting.


At the moment I'm unable to determine which company is providing 
infrastructure for On-Rev, and given the uncommonly high rate of 
downtime I hope Kevin or someone else from RunRev can step in here and 
offer additional information about both the infrastructure and plans for 
providing more customary uptime.


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys


___
use-livecode mailing list
use-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 variables

2013-08-19 Thread Richard Gaskin

Jacque wrote:

Basically, I'm storing a glossary. The keys are the glossary terms, some
of which are unicode. The definitions are the elements. The user points
to a word in a field and I need to retrieve the definition by matching
the displayed field text (which is unicodetext) with the glossary key.


I can't find where this is mentioned in the docs, but historically there 
was a caution against using anything but alphanumeric ASCII characters 
for key names.


In my experience that's more strict than it needs to be, but if the 
format of encoded arrays is any clue there may still be a restriction on 
having NULL bytes in a key name.


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

___
use-livecode mailing list
use-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: Windows standalone puzzle

2013-08-20 Thread Richard Gaskin

Curry Kenworthy wrote:


I see an of of in line -5. Also be sure of your cr's and your file paths!


Good catch!  I'd looked at Peter's code and completely missed that.

This is why I love this community:

When you need to optimize a routine into a three-line solution using 
arrays, Alex Tweedly will be the guy to deliver it.


When you need new ways of thinking about complex data structures, Dick 
Kriesel is your man.


When you need geometry, we all turn to Jim Hurley.

And when you need a pair of eyes able to see the finest of details, 
Curry's got your back.


Collectively, there's nothing we can't solve. :)

--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

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


Re: LC server experience return anyone ?

2013-08-20 Thread Richard Gaskin

RunRevPlanet wrote:


Knowing little about Apache meant I carefully followed the instructions in
the LiveCodeNotes-5_0_2-Server.pdf Deployment Notes and it worked after some
experimentation. I did have had to make sure the permissions of the
livecode-server.so file were set to allow it to execute. Thinking about it
now it seems relatively easy, but at the time it was quite confusing as I
had never done it before.

..

On an intangible note, the feeling of control when having your own VPS, in
contrast to shared hosting is worth every dollar. (Assuming the VPS is from
a company that does not try to squeeze too many users onto each piece of
hardware.) After having tried it I don't think I would ever go back to
shared hosted environment for any mission critical web site or apps.


For me, that's turned out to be the biggest unplanned benefit of 
managing your own server:  learning.


It's hard to beat the low cost of shared hosts, but nothing can beat the 
sense of empowerment you get once you step outside of that and learn 
even just a little about how Apache works.  It doesn't take much, and 
like learning most things you can chew on small bits over time, you 
don't need to learn everything at once.


But like learning LiveCode itself, the more you learn about servers the 
more you can do, and the more confident you feel doing it.


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

___
use-livecode mailing list
use-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: html tags recognized by htmlText

2013-08-20 Thread Richard Gaskin

Peter Haworth wrote:


Mark,

You said:

Best thing to do is fork the repository, git clone it locally, make

your changes, push them, and submit a pull request.



I heard :

Best thing to do is jwehf KJHFKHFTYL *%*%$$$ kjdkhdkjhd pull request

:-)


Cut to Godwin's Law:

http://www.youtube.com/watch?v=CDeG4S-mJts

:)

--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

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


Re: LC server experience return anyone ?

2013-08-21 Thread Richard Gaskin

jbv wrote:

 A few years ago, when I had the metacard engine installed on a
 dedicated server, the way it worked was that a new instance of
 the engine would launch for every incoming request, and would
 quit once the task was completed. This was ok for the kind of
 site I was working on : low-trafic site with complex tasks for
 each request.
 Is is the same with LC server ?

Yes, and it's the same for most CGI applications, such as PHP, Perl, 
etc.  In essence these are just command line apps called from Apache.


It's possible to set up PHP and Perl as stay-resident processes using 
mod_php/mod_perl, but on Dreamhost and others they don't do that because 
of server load - see the note here:

http://blog.dreamhosters.com/2006/04/11/end-of-php-as-an-apache-module/


 And is there a risk for the server to choke if too many instances
 launch simultaneously, or is there a way to tell Apache to queue
 the requests somehow ?

This is a question I've been pondering myself, esp. when comparing LC 
Server-based systems to complex beasts like Drupal.


When PHP us running as a CGI, all the core components of Drupal are 
loaded and initialized with each run - this is usually more overhead 
than most of us have with our LC Server apps (for example, the Drupal 
docs note a minimum RAM requirement of 18 MBs, while a single instance 
of LC server generally takes less than 2MB).


When a CGI app is done its memory is freed up, so the hit only comes for 
the duration in which simultaneous requests are being processed.


So it would seem likely that you'll have multiple instances of LC Server 
running simultaneously during peak hours.


But on the flipside, Wordpress, Drupal, Joomla and other complex systems 
are based on PHP, which is often run as a CGI, so even with multiple 
instances it would seem the impact is minimal.


Anyone have any good metrics on CGI RAM usage at scale?

--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys


___
use-livecode mailing list
use-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: Control From Outside

2013-08-22 Thread Richard Gaskin

Mark Wieder wrote:

Mike-

Wednesday, August 21, 2013, 7:56:25 PM, you wrote:


I'm doing this on Windoze


In that case, stderr will go directly to the console, while stdout
needs to be caught with redirection.


Mark, is this inconsistency between the Linux and Win builds a bug in LC 
or a bug in Windows?


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

___
use-livecode mailing list
use-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: html tags recognized by htmlText

2013-08-22 Thread Richard Gaskin

Peter Haworth wrote:

How do you find this stuff!  Seems there's a whole genre of similar Youtube
clips.


Jeanne DeVoto turned me on to those.  Every now and then someone makes 
another, and the git one popped up on my G+ feed recently.


Internet traffic is divided in four equal parts: spam, Hitler find out 
about... video, cat pictures, and everything else. :)


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys




On Tue, Aug 20, 2013 at 6:27 PM, Richard Gaskin
ambassador at fourthworld.comwrote:


Peter Haworth wrote:

 Mark,


You said:

Best thing to do is fork the repository, git clone it locally, make


your changes, push them, and submit a pull request.



I heard :

Best thing to do is jwehf KJHFKHFTYL *%*%$$$ kjdkhdkjhd pull request

:-)



Cut to Godwin's Law:

http://www.youtube.com/watch?**v=CDeG4S-mJtshttp://www.youtube.com/watch?v=CDeG4S-mJts

:)



___
use-livecode mailing list
use-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: Control From Outside

2013-08-22 Thread Richard Gaskin

Mike Kerner wrote:

Richard,
$# causes the script editor to mark the rest of the line as a comment.  $#
still works?


The token works well, so that would be a bug - reported:
http://quality.runrev.com/show_bug.cgi?id=11122

--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

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


Implications of DOJ vs Apple for developers?

2013-08-24 Thread Richard Gaskin
Having found Apple guilty of price-fixing, the DOJ has required the 
company to let competitors link to their own e-book stores from their 
apps. for a period of at least five years:

http://www.latimes.com/business/technology/la-fi-tn-doj-apple-revised-ebook-penalties-20130823,0,238864.story

What I haven't been able to find is whether this applies only to 
ebooks, or to any in-app purchases in the Apple app store.


With ebooks employing ever-increasing interactivity, what's the 
difference between an ebook and an app in terms of this injunction?


Are all developers now free to link to payment options for add-on 
content outside of Apple's store?


If not, how exactly is ebook defined in the DOJ's injunction?

I've been trying to dig up URLs with details on this, but so far all I'm 
finding is flamewar fodder and little substance.


Thanks in advance for any real info you can share.

--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

___
use-livecode mailing list
use-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: Implications of DOJ vs Apple for developers?

2013-08-24 Thread Richard Gaskin

Peter Bogdanoff wrote:

 Adam Engst of TidBits writes a good bit about this.

 An explanation of the decision:
 http://tidbits.com/article/13912

 The remedies:
 http://tidbits.com/article/13998

Thanks, Peter.


 I don't think it applies at all to the iTunes store because it had
 to do with Apple talking to the book publishers and they coming up
 with an agreement on pricing together.

 The eBook idea in this case seems to deal only with books published
 by the 5 major publishers in both print and eBook format, and the
 prices set for the eBooks. I didn't see any indication that it
 would cover other publications in other venues such as the iTunes
 store. There, Apple doesn't control the prices set for apps, the
 publishers do.

Publishers could set their price, they just couldn't set it any lower 
than was available in Apple's store.


In that regard, the situation seems similar to that of any content 
provider - I suspect we'll see similar rules across the board as others 
start wondering why ebook publishers can bypass the store but they can't.


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys


___
use-livecode mailing list
use-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: Problem with importing snapshot

2013-08-25 Thread Richard Gaskin

Charles Szasz wrote:
 Jim,

 Thanks for your comments.  I did use my variable, myImage but
 I accidentally  omitted it. Here is my actual script:

 export snapshot from group id 126899 of card graph to myImage as PNG
 set the clipBoardData[image] to myImage

 go stack report

 put myImage into image id 1033 of card page1 of stack report


 The stack report is a substack of my app and is used for printing.
 The code is in my print button of my main stack. The above code works
 but as I mentioned it strips out the text in the image.

Is the backgroundBehavior of the group set to true?  If it is, I suspect 
the problem is that the text of the field is stored with the card record 
rather than the field itself, so when using the from obj form of 
export it renders the object records, and unfortunately isn't taking 
other objects like the card into account.


I could consider this a bug, and if you have time to submit a simple 
example stack to illustrate the problem I'd guess it wouldn't be hard 
for them to fix; I believe they've already addressed other bugs related 
to the storage of the field contents in background (copy, maybe?  I 
don't recall which ones).


As a workaround, I wonder if you could copy the group to an offscreen 
stack, set the backroundBehavior to false, and then run the export on 
that copy?


Please let me know if that works, and if not some other workaround is 
likely possible.


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys


___
use-livecode mailing list
use-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: Problem with importing snapshot

2013-08-25 Thread Richard Gaskin

Charles Szasz wrote:

Richard,

Many thanks for trying to help me!  I checked and found that the 
backgroundBehavior is not checked at all.


Thanks for checking that.  This bug may be murkier than I'd thought.  Is 
the field's sharedText property set to true?


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

___
use-livecode mailing list
use-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: The encoding property

2013-08-26 Thread Richard Gaskin

Peter -

Not all properties are available for all object types; indeed, many are 
global properties.


What is your goal, and is the properties the best way to reach it?

--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

___
use-livecode mailing list
use-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: The encoding property

2013-08-26 Thread Richard Gaskin

Peter Haworth wrote:

My goal is to get a list of the valid property names for each Livecode
object (stack, card, field, etc)


I don't mean to sound pedantic, but serious question:  what is your goal 
with that?


Sometimes in our imperfect world we find limitations in the engine, and 
a hard-wired list can get the job done almost immediately, allowing us 
to move on to other important tasks.


True, this would require maintenance as properties change, but in the 
absence of any simple solution it may actually save time over trying to 
find an automated solution.


Having built a few property inspectors over the years, I use a mix of 
the properties of the selectedObject + a few hand-crafted things not 
normally included there.  Sure, it's imperfect, but it let me get it 
done. :)


But of course the usefulness of a manual solution will depend on how 
it's used, hence my opening question.


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

___
use-livecode mailing list
use-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: The encoding property

2013-08-27 Thread Richard Gaskin

Peter Haworth wrote:

This is for the next release of my lcStackBrowser plugin.  It will include
the ability to display and edit properties within the main lcStackBrowser
window.  As part of that functionality, users can define property groups to
include whatever properties they wish.  In turn, that is achieved by
drag/drop from a list of properties for an object type to a list of
properties within each of their property groups they specify.

Hope that explains the final goal :-)


It does - thanks.


At the moment, I am using a similar technique to yours where I start of by
getting the keys of the properties than add in a hard coded list of missing
properties for the object.  That's OK but suffers from the downside that
every time a new release of LC comes out with new properties that perhaps
is not included in the properties (and there have been quite a few
recently), my list is out of date and I would have to put out a new release
simply to include the new properties.

The issue of synonyms is part of but separate from all that.  I have now
figured out how to get a list of the synonyms for any given property from
Bjornke's db (what an invaluable plugin!), at least to the extent that the
information in the dictionary is accurate.


I wonder if perhaps you could split the difference, and have your 
property-checking routine done during development to build a list that's 
used at runtime.  That would keep runtime lean and efficient, and unless 
you plan on abandoning the utility (which wouldn't make sense of course 
after putting so much time into it) you'll probably be releasing new 
versions anyway, so keeping it updated with the engine probably won't 
need much greater frequency of updates than normal enhancements and bug 
fixes would require anyway.


Either way, as you noted the properties isn't providing what you need 
and requires some manual trimming anyway.  It's just designed for a 
different purpose, so until we get a function specifically for the needs 
of IDE builders (I'd love to see the complete properties of obj) 
some manual work will always be required.


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

___
use-livecode mailing list
use-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: Strange behavior of files()

2013-08-27 Thread Richard Gaskin

Michael Kristensen wrote:


I have a folder with 1347 jpg files

they are sequently named

 0001.JPG
 0002.JPG
 0003.JPG
...
 1345.JPG
 1346.JPG
 1347.JPG

Strangely the files() function return a list omitting the first two and the 
last two.

Thus the list start with  0003.JPG and ends with  1345.JPG.

Anyone seen this behavior?


I've seen what *looks* like that behavior, until I double-checked and 
discovered that file name listings returned from the files are not 
always sorted.


Instead, they return the values as known by the OS, which for some file 
systems often use inode order which may not reflect name sort order. 
Directories with large numbers of files may be especially prone to this, 
since the file lists are likely spread out across multiple inodes.


Try running the resulting list through the sort command to see if 
perhaps the files you're looking for are actually there but had not been 
where you'd expected them.


And an extra check might be to see if the number of lines in that list 
matches what you see in the OS file manager.


If you find they're not there please post back so we can find the recipe 
to pin down what at that point would be a bug.


--
 Richard Gaskin
 Fourth World
 LiveCode training and consulting: http://www.fourthworld.com
 Webzine for LiveCode developers: http://www.LiveCodeJournal.com
 Follow me on Twitter:  http://twitter.com/FourthWorldSys

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


<    4   5   6   7   8   9   10   11   12   13   >