In the fly-out menu from Object/New Control, I'd like to see "Mobile Text Field" as something that can be visually placed on a card and whose settings such as position, font, etc can be set from the property inspector.
I wanted an app that could copy and paste like any other app with text fields that has been around since Wang Word processors and the earliest of CRT terminals on mainframes and would be platform independent, but I was told I had to do something like this to make one (only in code)
...
-- intend to mimic a native text field called "pText"
if the environment is "mobile" then
put the rect of field "pText" into tRect
set the visible of field "pText" to False
mobileControlCreate "multiline", "mText"
mobileControlSet "mText", "visible", true
mobileControlSet "mText", "rect", tRect
mobileControlSet "mText","backgroundColor","white"
mobileControlSet "mText","textAlign","left"
mobileControlSet "mText","borderStyle","line"
mobileControlSet "mText", "fontSize",22
-- ...
end if
...
That would be a bunch of extra code if there were lots of these fields.
Then later in the app, when you want to actually use these, we once again have to resort to
-- under some button
if the environment is "mobile" then
put mobileControlGet("mText","text") into tText
put doSomething (tText) into tText
mobileControlSet "mText","text",tText
else
put the text of field "pText" into tText
put doSomething (tText) into tText
set the text of field "pText" to tText
end if
...
This is not very platform independent when you have to do this, and good luck debugging or running live on the mobile side.
But as a start, it'd be good to at least be able to draw these things with the visual editor used for other card layout.
Mobile text fields should honor the same kinds of properties as regular ones, and I see there seems to be a "mobileControlGet/Set" function for many of the things that are common to text fields on all platforms. Using those "mobileControlGet/Set" functions is very similar to the Microsoft stuff I have grown up with, and does not look at all like the prose form of the LiveCode language, so it is a bit of a eyeball issue too.
Mobile Text Field
Something you want to see in a LiveCode product? Want a new forum set up for a specific topic? Talk about it here.
Moderator: Klaus
-
- Posts: 15
- Joined: Sat Jul 18, 2015 5:11 pm
Jump to
- LiveCode Community
- ↳ Announcements
- ↳ Developer Services Marketplace
- ↳ User Groups and Events
- ↳ SoCal LiveCode Group
- ↳ Greater Toronto Area LiveCode Users Group
- ↳ Off-Topic
- ↳ Made With LiveCode
- Getting Started With LiveCode
- ↳ Getting Started with LiveCode - Complete Beginners
- ↳ Getting Started with LiveCode - Experienced Developers
- ↳ Converting to LiveCode
- Developing With LiveCode
- ↳ Talking LiveCode
- ↳ Databases
- ↳ Games
- ↳ Internet
- ↳ Multimedia
- ↳ Software Engineering
- ↳ Version Control
- ↳ Feature Proposals
- ↳ Bug Triage
- Extending LiveCode
- ↳ Using Plugins for Customizing the LiveCode IDE
- ↳ Using Externals
- ↳ Making IDE Plugins
- ↳ Building Externals
- ↳ LiveCode Builder
- Platform Specific
- ↳ Windows
- ↳ Mac OS
- ↳ Linux
- ↳ iOS Deployment
- ↳ Android Deployment
- ↳ CGIs and the Server
- ↳ HTML5
- ↳ Raspberry Pi
- Academic Endeavors
- ↳ Teaching with LiveCode
- ↳ Research and Post Secondary
- ↳ LiveCode University
- ↳ Educational Outreach
- Livecode Open Source Archived Forum- closed to posting
- ↳ Engine Contributors
- ↳ IDE Contributors
- ↳ Documentation and Tutorials
- ↳ Brainstorms
- ↳ Community Projects
- LiveCode Hosting