Friday, May 15, 2009

QnA - Bakit po hindi pwedeng mag add ng textfield sa canvas?

Adding textfield to a canvas? Oo at maybe ang sagot dyan. :) Naturally, hindi kasi a textfield is somewhat a higher type of UI and canvas is a lower type.

Ganto kasi, think of it this way: a textfield is a doc type of file and a canvas is a text file. If titingnan mo yung dalawa, parehas silang nakakapag store ng strings. However, the way a text file is stored is very different sa way a doc file is stored. Kasi ang a doc file can contain graphics, font formatting, etc. Pero ang text file is just a simple low level flat file.

Now, ang textfield at canvas ay parehong J2ME class. Pero kagaya ng text file and doc file na ang way ng representation ay magkaiba, the way a textfield and canvass are represented sa JVM and how they work ay different din which makes them incompatible sa isa't isa kaya you can't mix them on the same screen.

Sabi ko kanina maybe pwede din sila magkasama. Kasi a couple of months ago, may nabasa ko about Synclast. I think may custom class sila which enables you to work both on textfields and canvass. I haven't tried it yet kaya I can't vouch for this pero if my memory serves me right, pwede po ito. :)

No comments:

Post a Comment