Search found 31 matches

by cpuandnet
Sun Oct 15, 2023 5:45 pm
Forum: Windows
Topic: "Enabled of menuitem" doesn't work on Windows standalone
Replies: 6
Views: 7945

Re: "Enabled of menuitem" doesn't work on Windows standalone

I haven't used menuItems much but I don't think each menu item has individual properties because they exist in a list. Try changing your code to look something more like this: if demoRunning then disable menuItem i of button "someButtonName" else enable menuItem i of button "someButtonName" end if
by cpuandnet
Sun Oct 15, 2023 4:40 pm
Forum: Windows
Topic: "Enabled of menuitem" doesn't work on Windows standalone
Replies: 6
Views: 7945

Re: "Enabled of menuitem" doesn't work on Windows standalone

The keyword OF is missing between enabled and menuItem. Try:

Code: Select all

set the enabled of menuItem i of button "Some Button Name" to (not demoRunning)
Tim
by cpuandnet
Sat Oct 14, 2023 3:33 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: new to Polygrid
Replies: 13
Views: 15373

Re: new to Polygrid

As Klaus indicated, the polygrid is easier. Start with the polygrid and see if that fills your requirements. If not, then you can move to the datagrid. The datagrid is very powerful but can also be a bit fussy or slow at times so you really need to experiment in your learning process of the datagrid...
by cpuandnet
Fri Oct 13, 2023 4:25 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: new to Polygrid
Replies: 13
Views: 15373

Re: new to Polygrid

Hi Lemodizon, Looking at your code, keep in mind that you are using pgText not pgData. With pgText, think lines and items not arrays, elements and keys like you would with pgData. So, in lieu of that I would use something like this, assuming that the quantity column is the first column and you have ...
by cpuandnet
Fri Sep 15, 2023 10:19 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Adding Options to an option Menu
Replies: 3
Views: 1729

Re: Adding Options to an option Menu

Using a combobox might be easier then using a popup menu. The user can type in an unlisted value from the combobox and you can handle the closeField event in that case to ask the user if they want to add it to the option choices. I've attached an example stack of what i'm talking about. I hope this ...
by cpuandnet
Fri Feb 10, 2023 10:56 pm
Forum: CGIs and the Server
Topic: Mixing HTML & LC
Replies: 2
Views: 4898

Re: Mixing HTML & LC

Hi Paul, At first glance, I believe it may be an inner quote issue with the first put statement. Try this: Put "<div class=" & quote & "alert alert-danger" & quote & " role=" & quote & "alert" & quote & ">" Also, when posting to the forum, you should always post your code inside of the code display ...
by cpuandnet
Sun Jan 22, 2023 7:21 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Microsoft Access Database
Replies: 4
Views: 1904

Re: Microsoft Access Database

Yes, of course. This is way oversimplified but you'll get the idea. Assuming your developing on and for Windows... local tDatasource put "Driver={Microsoft Access Driver (*.mdb, *.accdb)};" & \ "DBQ=c:\your\path\to\your\database.accdb;" into tDatasource local tUsername put "Admin" into tUsername loc...
by cpuandnet
Fri Jan 20, 2023 6:18 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Microsoft Access Database
Replies: 4
Views: 1904

Re: Microsoft Access Database

Hi Tom,

No, not directly. You need to use an ODBC driver via DSN or use a DSNless string. I use it all the time but prefer the DSNless string option because one does not have to setup the DSN on each machine.

Tim
by cpuandnet
Fri Sep 30, 2022 4:46 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Tab order through controls
Replies: 21
Views: 9263

Re: Tab order through controls

One can also use the project browser to click and drag the controls up and down on the card to the desired tab order. It is a lot easier then having to click on each control and enter a layer number.

Tim
by cpuandnet
Tue Aug 09, 2022 4:58 pm
Forum: Databases
Topic: ODBC data type mismatch when setting datetime column to null
Replies: 0
Views: 10713

ODBC data type mismatch when setting datetime column to null

Has anyone encountered a data type mismatch error when trying to set datetime columns to null through a parameterized query via ODBC. It looks like there may have been some issues in the past but I did not find any definitive resolve regarding it. Thank you for any help or work arounds you can offer...
by cpuandnet
Tue Jan 25, 2022 8:52 pm
Forum: Databases
Topic: ODBC Error
Replies: 13
Views: 13731

Re: ODBC Error

Have you tested connecting through ODBC from another application besides LC such as Excel or Access?
by cpuandnet
Mon Jan 24, 2022 6:41 pm
Forum: Databases
Topic: ODBC Error
Replies: 13
Views: 13731

Re: ODBC Error

Just as a test, try using a DSN-less connection and see what happens put "DRIVER={Progress OpenEdge 11.6 Driver};HOST=JFH1;PORT=2701;DB=gams1;UID=jmorg;PWD=" & tDBpword & ";DIL=0" into tDatasource put revOpenDatabase("ODBC", tDatasource,,,) into gConID I rarely use user, system or file DSNs anymore ...
by cpuandnet
Sat Jan 22, 2022 5:35 am
Forum: Databases
Topic: ODBC Error
Replies: 13
Views: 13731

Re: ODBC Error

Are you using LC 32-bit as well?
by cpuandnet
Thu Nov 18, 2021 9:03 pm
Forum: Databases
Topic: sql in livecode
Replies: 1
Views: 2887

Re: sql in livecode

Remove the VALUE keyword and parenthesis from the parameters in your UPDATE sql statement. Try this instead. put "UPDATE " & tTableName & " SET HighScore= " & " :1 " & "WHERE UserName=" & " :2" into tSQL I would also recommend simplying the statement to something with less concatenations like this p...
by cpuandnet
Tue May 25, 2021 5:00 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Best practice
Replies: 6
Views: 3129

Re: Best practice

One might want to consider this method as well. I'm not sure if it will make any difference.

Code: Select all

put field "test" into tTest
put char 1 to 3 of tTest into tResult
return tResult

Go to advanced search