Recent

Author Topic: makeing interfaces for wince?  (Read 31130 times)

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
makeing interfaces for wince?
« Reply #15 on: April 02, 2006, 11:54:36 pm »
Quote from: "roozbeh"
well thanks.
although with this compiler also file size is around 9mg and after wince-arm-strip utility it gets down to 2.


But the executables do work, right?

Yes, here they are 9MB too =/

But don´t worry about it too much, this is probably just some features being added to the Compiler that are causing instability. In 2 weeks (a wild guess) it should be back to normal 2MB before strip again.

Quote from: "roozbeh"
about lcl interfaces,is there any reason why they are not so alike win32 interfaces?
as they do almost very same tasks?


Well, only because I´m the only one so far to send patches to wince interface =) And I have a anormous amount of other things to do.

A simple copy isn´t possible (I tryed it) because WinCE lacks many API functions. Also, all functions that deal with strings must translate them to the appropriate charset as Lazarus IDE uses utf-8 or iso and WinCE is pure utf-16

We need to copy some parts, modify others and add some wince specific code to deal with charset, etc.

Quote
i have implemented lots of other controls,just wondering how coding styles should be...


Great! I can´t wait to try it =)

The coding style is the Borland style.

There are 3 wiki pages you should read:

http://wiki.lazarus.freepascal.org/index.php/How_To_Help_Developing_Lazarus

http://wiki.lazarus.freepascal.org/index.php/DesignGuidelines

http://wiki.lazarus.freepascal.org/index.php/Creating_A_Patch

Quote
for example i dont like calling and seeing MultiByteToWideChar whenever i want something to be trasfered to unicode and backward..so i've implemented strtounicode as a simple function.
for example is there a problem with doing so or not?


No, not a problem. Just put it at a suitable place. There is usually a unit on each interface for miscelaneous functions. I think for wince it should be called winceproc.

Quote
anyway where to send modified sources?


Please, join the Lazarus Mailing List and send them as a attachment. Careful that attachment limit is 40kb, so you may need to compress them.

If you do not like mailling lists, you can use gmane to access it like a newsgroup.

server:news.gmane.org
Group:gmane.comp.ide.lazarus.general

Also, the accepted way to send modifications to Lazarus is by sending patches. If you are using the subversion Lazarus, please try to create a patch. If not, just send the source and I will try to make a patch out of it.

But in the future, send patches.

thanks,

Felipe

Anonymous

  • Guest
makeing interfaces for wince?
« Reply #16 on: April 08, 2006, 07:57:39 pm »
well i think messages and messages handling is somehow not working in wince forms
my forms as far as i know doesnt recieve any messages?

is it anything i should develop or it is problem whithin fpc?

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
makeing interfaces for wince?
« Reply #17 on: April 09, 2006, 01:52:27 am »
Quote from: "Anonymous"
well i think messages and messages handling is somehow not working in wince forms
my forms as far as i know doesnt recieve any messages?


Well, you just need to find out what does message handling on Win32 interface and then copy the code to the wince interface and after that do some modifications like:

* All string handling routines need to do calls to convert the strings

* All WinAPI functions that have Ansi and Wide version should call the Wide version

roozbeh

  • New Member
  • *
  • Posts: 18
    • http://www.spv3d.com
makeing interfaces for wince?
« Reply #18 on: April 09, 2006, 09:54:59 am »
well i figured that out..
now clicking on button,checkbox,radiobutton is working.
but is it possible to use lazarus for debugging?compiling?

becouse i saw lazarus use gdb for debugging...can i change it to gdb for wince and use it to debug on device?
also is it possible to use wince interfaces for compiling code and debugging it on win32?
becouse i mostly do the same for other programs in visual c...i write them in evc4,debug them in visual studio for windows and most of time it works good on device....

currently every event sent to main form causes exception....all other controls are fine but the main form!

roozbeh

  • New Member
  • *
  • Posts: 18
    • http://www.spv3d.com
makeing interfaces for wince?
« Reply #19 on: April 09, 2006, 12:18:49 pm »
well i did work...i am going to like this lazarus...
i think it is usefull if added to wiki too.
with that  gdb for wince you can debug inside lazarus and even see local variables and....
but unfortunatly it is very slow to be that usefull...i dont know why...but very slow...maybe becouse of huge size of exe file!

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
makeing interfaces for wince?
« Reply #20 on: April 09, 2006, 02:21:27 pm »
Hello,

Can you send us the great work you did so far? I´m getting anxious to try it =) And I can also help you fix problems.

About the debbuger, Yuri, the creator of the WinCE port of Free Pascal was working with the debbuger, perhaps he knows something.

About the wiki, I created a section for debugging here:

http://wiki.lazarus.freepascal.org/index.php/Windows_CE_Interface#Debbuging_Windows_CE_software_on_the_Lazarus_IDE

It would be really nice if you could add some instructions on how to debug wince software with the IDE.

thank you very much,

Felipe

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
makeing interfaces for wince?
« Reply #21 on: April 09, 2006, 02:52:05 pm »
Quote from: "roozbeh"
also is it possible to use wince interfaces for compiling code and debugging it on win32?
becouse i mostly do the same for other programs in visual c...i write them in evc4,debug them in visual studio for windows and most of time it works good on device....


Yes, You can create your software on the IDE compiling it for win32 and debug them normally and when you want to, recompile it for windows ce.

The idea is that any software (in a ideal world) developed with Lazarus can be recompiled for any of the interfaces and it would work the same.

Note, however, that this does not allow you to debug the wince interface itself under win32.

In short: To find problems on your project you can compile it for win32 and test it. To find problems on the wince interface you need to run the software under wince.

roozbeh

  • New Member
  • *
  • Posts: 18
    • http://www.spv3d.com
makeing interfaces for wince?
« Reply #22 on: April 10, 2006, 11:10:19 am »
well i am thinking of debuggin wince interface under win32....i think anyhow it could be very usefull!

i've added something to wiki....i know it is badly written but that was my best ;)

roozbeh

  • New Member
  • *
  • Posts: 18
    • http://www.spv3d.com
makeing interfaces for wince?
« Reply #23 on: April 11, 2006, 05:46:59 pm »
i've posted tha patch to newsgroup
i am not around for a week...there are some nasty bugs out there still!
anyway i dont how lcl is organized...just dont know why so many exact names in diffrent units.you can easily compile a wrong code with diffrent order of units in your uses list!

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
makeing interfaces for wince?
« Reply #24 on: April 11, 2006, 07:05:58 pm »
Quote from: "roozbeh"
i am not around for a week...there are some nasty bugs out there still!


All take a look and see what I can do =)

Quote
anyway i dont how lcl is organized...just dont know why so many exact names in diffrent units.you can easily compile a wrong code with diffrent order of units in your uses list!


Can you give me an example?

I am not sure what you mean with "exact names in diffrent units"

Anonymous

  • Guest
makeing interfaces for wince?
« Reply #25 on: April 16, 2006, 11:00:36 pm »
i mean same procedure names are defines in diffrent units.
so the order of units in uses clause is important.and for example if windows unit become not first in uses clause somethimes caouse troubles.

i still dont know if the current one is still ok?

 

TinyPortal © 2005-2018