I am a FRUSTRATED out of my mind newbie

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

TS
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5
Joined: Mon Sep 15, 2008 9:59 am

I am a FRUSTRATED out of my mind newbie

Post by TS » Mon Sep 15, 2008 10:05 am

Long history with HyperCard, finally have to move over to something that will run on Intel Macs. Using the Free Trial. Apps are for intra-company use only, in Japanese.

I cannot believe how badly this product handles Japanese. Does anyone know of any Revolution stacks using Japanese that I can download and inspect the scripts for? I have wasted an entire day and gotten nowhere.

Thanks in advanced.

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Contact:

Post by malte » Mon Sep 15, 2008 10:16 am

Hi,

I am not working with Japanese in Rev, however there are some people that do. So you might want to head over to the japanese forum and get help there. I think the japanese userbase will be able to help you best.

http://forums.runrev.com/jp/phpBB2/index.php

If you are having trouble getting unicode to work, I bet Mark will chime in here to give you some head ups.

All the best,

Malte

TS
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5
Joined: Mon Sep 15, 2008 9:59 am

Post by TS » Sat Sep 20, 2008 7:03 am

Thanks, malte. I did go over to the Japanese forums; basically two guys chatting back and forth to each other. But they were very helpful in getting me started with Japanese -- importing data, using unicode a bit, etc.

Still having trouble with Japanese variables, user prompts, etc., but headed in the right direction. Still, using Japanese in Rev is very clumsy - similar to using urlencode for web stuff. A huge step backward from any other software I've experienced!

But I'm on my way to see if I can use Rev to re-write all our HC apps. Thanks!

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Sat Sep 20, 2008 9:00 am

Hi TS,

Regarding user prompts, write one in a field and set a custom property to the htmlText of that field. Now you should be able to do something like this:

Code: Select all

answer warning the cJapanesePrompt of this stack
Probably, you will want to create your own answer dialog, with Japanese OK and Cancel buttons. You could also create a different type of dialog and simply open that stack as modal whenever you need dialog window. Let me know, if you need either method to be explained.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

TS
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5
Joined: Mon Sep 15, 2008 9:59 am

Post by TS » Sat Sep 20, 2008 5:20 pm

Hi Mark,

I do follow you on the prompts; that's what I'll try. Another thing I'm having trouble with is grokking arrays. Have read the manual and all else I can google on it, but still can't visualize them. I do a lot with arrays in HC -- but simply via lines and items of containers. How does Rev's array differ? And how can I put Japanese into arrays?

Thanks,


Tim

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Sat Sep 20, 2008 6:16 pm

Hi Tim,

HyperCard has no arrays.

In Revolution, you can give variables an index. For example:

Code: Select all

put "some text" into myArray["text"]
put 37 into myArray["temperature"]
You can also give an index to one element of an array.

Code: Select all

put "John Smith" into myArray["customer"]["name"]
put 45 into myArray["customer"]["age"]
Note that you can't put an array directly into a field. You need to get the text first. For example:

Code: Select all

repeat for each key myKey in myArray["customer"]
  put myKey & tab & myArray["customer"][myKey] & cr after myList
end repeat
put char 1 to -2 of myList into fld "Customer"
You probably will want to read in the docs about split and combine. The engine change log included with Rev 3.0 also contains some interesting information.

I hope this helps.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

russjapan
Posts: 6
Joined: Fri Aug 19, 2011 11:42 am

Re: I am a FRUSTRATED out of my mind newbie

Post by russjapan » Fri Aug 19, 2011 11:50 am

I'm also having difficulty displaying Japanese text correctly, and the LiveCode documentation on unicode isn't clear to me. I want to display a message in Japanese using the answer dialog. From what I have read I need to type the Japanese text into a field (named japaneseText here) and then activate the dialog at the click of a button with the following

Code: Select all

answer the htmlText of cd field "japaneseText" 
However this doesn't work, text appears in the field, but nothing appears in the dialog. Could someone give a step-by-step for displaying Japanese text in Answer dialogs?

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: I am a FRUSTRATED out of my mind newbie

Post by Mark » Fri Aug 19, 2011 2:14 pm

Hi russjapan,

Can you attach a stack or file with the text that you want to display?

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

russjapan
Posts: 6
Joined: Fri Aug 19, 2011 11:42 am

Re: I am a FRUSTRATED out of my mind newbie

Post by russjapan » Fri Aug 19, 2011 2:20 pm

I can if you really need it but I am trying to display any Japanese text that includes kanji, for example 日本語 would do.

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: I am a FRUSTRATED out of my mind newbie

Post by Mark » Fri Aug 19, 2011 2:51 pm

Hi japrus,

I have no problems with 日本語. It shows up in the answer dialog box as expected.

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

russjapan
Posts: 6
Joined: Fri Aug 19, 2011 11:42 am

Re: I am a FRUSTRATED out of my mind newbie

Post by russjapan » Sat Aug 20, 2011 3:04 pm

Well, I found the source of the problem... I had previously set the field in question to a Japanese text font (Osaka) as would seem reasonable. With Osaka set as the font, the dialog displayed mojibake, with a roman font it displays as it should... Probably worth a note somewhere to save others a few hours of frustration.

russjapan
Posts: 6
Joined: Fri Aug 19, 2011 11:42 am

Re: I am a FRUSTRATED out of my mind newbie

Post by russjapan » Sat Aug 20, 2011 3:25 pm

And having solved that particular problem, a new one has come up when testing on the iPhone Simulator. Japanese displays fine in the the LiveCode dialog box now (after changing the text formatting of the field from Osaka to a roman font) but it looks like iOS just shows the actual htmlText. The code is

Code: Select all

on mouseUp
   put the htmlText of fld "Japanese1" into tChinPrompt
answer tChinPrompt with "Cancel" or "OK" 
end mouseUp
I attach a screenshot to compare the difference.
Dialogs.jpg

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: I am a FRUSTRATED out of my mind newbie

Post by Mark » Tue Aug 23, 2011 11:59 pm

Hi Russ,

Looks like a LC bug to me.

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

russjapan
Posts: 6
Joined: Fri Aug 19, 2011 11:42 am

Re: I am a FRUSTRATED out of my mind newbie

Post by russjapan » Wed Aug 24, 2011 3:19 pm

Blimey... well if it os then our whole LiveCode development plan in Japan goes down the tubes until it gets fixed... Is anyone from RunRev reading these forums? Could they confirm the status of this problem?

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: I am a FRUSTRATED out of my mind newbie

Post by Mark » Wed Aug 24, 2011 3:36 pm

Hi,

Report the problem to the quality control center and wait.
http://quality.runrev.com/

I hope more people will report the same problem and eventually it will be fixed.

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Post Reply