Tuesday, January 22, 2013
Key Events with Class Cocoa Controls in Real Studio (Xojo)
The coolest part of using Real Studio is access to all the controls for each platform. Some of these controls are not built-in by default but are still available to use by using declares or Plugins (Like Monkey Bread Software, Complete Plugin or the Mac OSLib (free by the way.) to name an few.). Whatever you choose its up to you.
This however can present some interesting coding challenges to add support for certain events that are available to similar built in controls. Such as the text field keydown event can use an return key to preform an action. There is no keydown event however for an non built-in control, instead one needs to get creative and figure another way around this.
Lucky enough anything is possible by code. This is an simple look at getting an NSSearchField on OSX to search on clicking the Return or Enter key press. This without an event that supports keydown or keyup events.
The reason for this video is there no documentation, I could find to tell us how to do such. It was hours of trial and error to figuring it out. However I believe such information should be shared.
Here an simple video to show how this is done. I showing this off using OSX based controls, because I currently on mac. But should be similar on other platforms.
Wednesday, January 16, 2013
Mask Numbers only with text field in Cocoa
I been finding out many things that worked in Mac Carbon builds do not actually work the same in Cocoa builds. Lucky enough there are work arounds to fix many of these items.
In Carbon if we wanted to limit numbers in an text field we could simply do this in its open event. Using an mask like such:
me.text="9999"
That mask would limit numbers only and up to 4 numbers max. However masks do not work in Cocoa at all so we need to address this in an keydown event. This quick you tube video we made shows the simple and fast work around, witch does work on all platforms, Including Cocoa builds.
I hope this helps out, moving from carbon to fully support Cocoa. As its little things like this that can make the task of converting Older Carbon apps to Cocoa not as simple as just an recompile.
In Carbon if we wanted to limit numbers in an text field we could simply do this in its open event. Using an mask like such:
me.text="9999"
That mask would limit numbers only and up to 4 numbers max. However masks do not work in Cocoa at all so we need to address this in an keydown event. This quick you tube video we made shows the simple and fast work around, witch does work on all platforms, Including Cocoa builds.
I hope this helps out, moving from carbon to fully support Cocoa. As its little things like this that can make the task of converting Older Carbon apps to Cocoa not as simple as just an recompile.
Wednesday, November 14, 2012
Installing Livecode on Linux
I had to set up an new Linux box this week and came accross that time when to Install Livecode, again. Since we been asked this question before. How to install Livecode on Linux? I figure why not do an quick 1 minute video screen how to. Hopefully someone finds this useful. If not , oh well.
Sunday, September 30, 2012
Java To Objective-C Translation
I came across an interesting little open source project today. J2ObjC which is an Java to iOS Objective-C translation tool and runtime. The tool enables Java code to be part of an iOS app. J2ObjC is an Google made tool and worth checking out. Even if just for experimentation.
More Info
More Info
Labels:
Code Translation,
iOS,
iPad,
iPhone,
j2objC,
Java 2 objective-c,
Xcode
Adding Borders to Images with Livecode
If your looking for an clean rect boarder within an image within Livecode you need to do so using groups. I found an great tutorial demo this off by Jan Sckenkel of Quartam Software. Jan's example is way beyond just borders and is worth checking out.
His StyledImageView custom control article come in two parts
Part 1 StyledImageView custom control
Part 2 StyledImageView custom control(Part 2)
I suggest checking these out. It an really cool project demo with code. Great job Jan.
His StyledImageView custom control article come in two parts
Part 1 StyledImageView custom control
Part 2 StyledImageView custom control(Part 2)
I suggest checking these out. It an really cool project demo with code. Great job Jan.
Livecode Control Margin fix for OSX
As of Mac OSX 10.7 or later the controls in Livecode are off. Off how you might ask, well the label is off on the buttons, Checkboxes, Radio Buttons etc. The label is not aligned to the control and makes the user experience feel incorrect. There an simple fix however, by setting the text margins to align back to center. These are the margins I found that work to get the appearance correctly align for these controls.
Livecode 5.1.0 or later
This is for the default object height.
Push Buttons: 2,12,2,13
Rectangle Button: 2,12,2,13
Combo Box: 6,8,2,13
Radio Buttons: 4,15,2,13
Check Box: 4,15,2,13
Option Menu: 2,14,2,13
Pulldown: 4,14,2,13
These margins can be set by script or the properties palette.
Livecode 5.1.0 or later
This is for the default object height.
Push Buttons: 2,12,2,13
Rectangle Button: 2,12,2,13
Combo Box: 6,8,2,13
Radio Buttons: 4,15,2,13
Check Box: 4,15,2,13
Option Menu: 2,14,2,13
Pulldown: 4,14,2,13
These margins can be set by script or the properties palette.
Friday, September 28, 2012
Open Source Livecode iOS Externals
I had made some externals to interface with Livecode and iOS. Some of which are now built into the IDE or do an small little things. I added these iOS externals for Livecode as free downloads with full source code to an backend webpage. I add an few new ones every once in an while.
I tried charging for my OSX Core Image External for Livecode OSX for only $50.00 and only an handful bothered buying and supporting it. It also seem to piss an ton of people off (I know because they emailed us.) that some one would spend months making an really cool addition to the Livecode tool, and then actually charge an small fee of $50.00 for there effort. Specially when most of the Livecode 3rd party tools cost more than that, and do far less.
With that I am over selling externals for Livecode. I will share them as full open source and AS-IS. Maybe it will help someone learn or whatever.
Here an page to some limited open source iOS Livecode Externals we made, hope you enjoy. Link
I tried charging for my OSX Core Image External for Livecode OSX for only $50.00 and only an handful bothered buying and supporting it. It also seem to piss an ton of people off (I know because they emailed us.) that some one would spend months making an really cool addition to the Livecode tool, and then actually charge an small fee of $50.00 for there effort. Specially when most of the Livecode 3rd party tools cost more than that, and do far less.
With that I am over selling externals for Livecode. I will share them as full open source and AS-IS. Maybe it will help someone learn or whatever.
Here an page to some limited open source iOS Livecode Externals we made, hope you enjoy. Link
Sunday, September 9, 2012
10 Livecode features I want
Livecode is an great tool and does so many things out of the box its mind boggling. However as technology changes so does any development tool, and its need to support new things. Here my top ten wish list for Livecode (Not in order).
1. Full Cocoa Support For Mac.
2. Windows Mobile & Surface supported
3. Native Spell Checking (All platforms)
4. Multi-Channel Audio Player for all platforms (Like iOS and Android have)
5. Upgraded IDE (with Custom editor improvements, Scaleable window editor, one window design.)
6. Full Game Center (for both iOS & Mac)
7 Native Toolbars
8 Native Web Browser on Linux (The only livecode platform without one, why?)
9 Native Movie Player for every platform
10 64-bit for all desktop platforms
1. Full Cocoa Support For Mac.
2. Windows Mobile & Surface supported
3. Native Spell Checking (All platforms)
4. Multi-Channel Audio Player for all platforms (Like iOS and Android have)
5. Upgraded IDE (with Custom editor improvements, Scaleable window editor, one window design.)
6. Full Game Center (for both iOS & Mac)
7 Native Toolbars
8 Native Web Browser on Linux (The only livecode platform without one, why?)
9 Native Movie Player for every platform
10 64-bit for all desktop platforms
Subscribe to:
Posts (Atom)