Search found 9 matches

by timlit
Sun Oct 21, 2012 3:54 pm
Forum: Talking LiveCode
Topic: field changed message
Replies: 13
Views: 10671

Re: field changed message

I might do as follows:

Code: Select all

- put field id (i) into tHistory[i]
- put the_external_value into field[i]
- if tHistory[i] <> field id (i) then answer "the value has changed!"
in data packed systems, I generally find it helpful to pass gui-targeted values through arrays.

hth,
by timlit
Sat Oct 20, 2012 4:00 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Problems with CSV files
Replies: 9
Views: 6550

Re: Problems with CSV files

how about this opening step (or variations with/without leading or trailing qoute):

Code: Select all

replace (quote & <delimiter> & quote ) with <delimiter> in x
as for line deletion, try smth like:

Code: Select all

delete line 1 to 1 of x
look up "delete chunk" in the dictionary
by timlit
Fri Oct 19, 2012 11:57 am
Forum: Getting Started with LiveCode - Experienced Developers
Topic: Restricting field input to ASCII only?
Replies: 8
Views: 7409

Re: Restricting field input to ASCII only?

Of the modifiers, relevant to filtering ASCII, only SHIFT seems to be of importance.

I have just tried it & hence, it's good to go!
by timlit
Fri Oct 19, 2012 11:26 am
Forum: Getting Started with LiveCode - Experienced Developers
Topic: Read file names properly
Replies: 2
Views: 2749

Re: Read file names properly

it must be referring to the name of the main card, not the filename.
Just rename it, or refraining from opening both files at the same time.
by timlit
Fri Oct 19, 2012 11:12 am
Forum: Getting Started with LiveCode - Experienced Developers
Topic: Restricting field input to ASCII only?
Replies: 8
Views: 7409

Re: Restricting field input to ASCII only?

Klaus, not sure, what bug you're talking about. My IDE is the old & updated Revolution 4.5 and I have successfully tested methods 1 and 3, with the keydown triggered ok. 3d way, being regex, should work no matter what, right? Maybe, cheer up and try 122 (letter z)? :) on keyDown pKey if charToNum(pK...
by timlit
Fri Oct 19, 2012 9:35 am
Forum: Getting Started with LiveCode - Experienced Developers
Topic: Restricting field input to ASCII only?
Replies: 8
Views: 7409

Re: Restricting field input to ASCII only?

filtering approaches, 3rd probably being best: - if character code is > 127(?) then erase last char - if char is not among the lines "a,b,c...z" then erase last char - user the perl regex: put replaceText(field id 1, "[^0-9A-Za-zà-ÿ]","") into field id 1 (or similar) (look up "filter" and 'replacete...
by timlit
Thu Oct 18, 2012 7:40 pm
Forum: Talking LiveCode
Topic: Assigning variables
Replies: 6
Views: 4508

Re: Assigning variables

As for declaring vars, I come from compiled languages and well know the importance.

Thank you, mwieder, for mentioning your GLX2, I'm thrilled.
If all goes well, no way will I return to its LC counterpart.
by timlit
Thu Oct 18, 2012 7:07 pm
Forum: Talking LiveCode
Topic: Assigning variables
Replies: 6
Views: 4508

Re: Assigning variables

Good point. Yes, poor test on my part.
What I'd expect, though is of the wrapper to be slower at all times.
Yet, if the tasks are not critical back-end jobs, I still prefer to use my custom function.

I simply do not like the "put-shmut" thing.

:? :) Thanks.
by timlit
Thu Oct 18, 2012 6:40 pm
Forum: Talking LiveCode
Topic: Assigning variables
Replies: 6
Views: 4508

Assigning variables

I have a tip for those annoyed by the LC way of assigning variables. [I didn't find the issue addressed on the forum - prior to posting] So, my solution is in using custom functions (FileMaker-like fashion): let a, 1 ("put 1 into a") leta a, 1 ("put 1 after a") letb a, 1 ("put 1 before a") Though th...