Re: [lazarus] GamePack 1.0 Released
I did so, but still the same behavior. Just to note, I commented out the lines and then rebuilt the IDE a couple of times to be sure. Thanks Lee, At least it rules out the obvious. I will be home this weekend where I have a windows machine, I'll give it a shot when I'm there and see if I can locate and fix the bug. A.J. -- Any sufficiently advanced technology is indistinguishable from magic - Clarke's law Any technology that is distinguishable from magic is insufficiently advanced -Gehm's corollary Any technologist that is distinguishable from a magician is insufficiently advanced - My corollary The worlds worst webcomic: http://silentcoder.co.za/scartoonz The worlds best cybercafe manager: http://outkafe.outkastsolutions.co.za begin:vcard fn:AJ Venter n:Venter;AJ org:Global Pact Trading Pty. Ltd.;OutKast Solutions email;internet:[EMAIL PROTECTED] title:Director of Product Development tel;work:+27 21 554 5059 tel;fax:+27 11 252 9197 tel;cell:+27 83 455 9978 url:http://www.outkastsolutions.co.za version:2.1 end:vcard
Re: [lazarus] GamePack 1.0 Released
I downloaded and installed the components fine. However, when trying to load the demo project, the IDE hangs and eats up 50% CPU. End Task'ing the lazarus process in Windows is necessary at that point. Is this only linux/gtk? Or is Win32 supported? Hi Lee, It's definitely meant to be a multiplatform suite. You seem to have discovered a win32 specific bug. Since I only use native components that means that it must be something the w32 widget set does different. Logically - only visual components could have issues with widget set implementations. That limits it to TDoubleBuffer. The only part of TDoubleBuffer that is active during design is the paint method - so it seems win32 isn't handling that right. Please try the following for me (I have no access to a windows machine for a while) Fine the lines in doublebuffer.pas that read: if csDesigning in ComponentState then Self.Canvas.CopyRect(rect(0,0,width,height),FBackground.BitMap.Canvas,rect(0,0,width,height)); And comment them out. This will have no impact on running programs, it will just prevent the background from being visible at designtime - but it may solve your problem. Please let me know if it does, so I can update the code on my side (I would use an IFDEF I imagine). Win32 experts: If this works, how SHOULD I do it instead ? Ciao A.J. -- Any sufficiently advanced technology is indistinguishable from magic - Clarke's law Any technology that is distinguishable from magic is insufficiently advanced -Gehm's corollary Any technologist that is distinguishable from a magician is insufficiently advanced - My corollary The worlds worst webcomic: http://silentcoder.co.za/scartoonz The worlds best cybercafe manager: http://outkafe.outkastsolutions.co.za begin:vcard fn:AJ Venter n:Venter;AJ org:Global Pact Trading Pty. Ltd.;OutKast Solutions email;internet:[EMAIL PROTECTED] title:Director of Product Development tel;work:+27 21 554 5059 tel;fax:+27 11 252 9197 tel;cell:+27 83 455 9978 url:http://www.outkastsolutions.co.za version:2.1 end:vcard
Re: [lazarus] GamePack 1.0 Released
mramirez wrote: Quoting A.J. Venter [EMAIL PROTECTED]: Hi all, As I promised last week, I finished and released GamePack version 1.0. Could be see some screenshots ? As you wish. I added some screenshots to the wiki page: http://outkastsolutions.co.za/outkast/index.php?option=com_openwikiItemid=id=gamepack Ciao A.J. -- Any sufficiently advanced technology is indistinguishable from magic - Clarke's law Any technology that is distinguishable from magic is insufficiently advanced -Gehm's corollary Any technologist that is distinguishable from a magician is insufficiently advanced - My corollary The worlds worst webcomic: http://silentcoder.co.za/scartoonz The worlds best cybercafe manager: http://outkafe.outkastsolutions.co.za begin:vcard fn:AJ Venter n:Venter;AJ org:Global Pact Trading Pty. Ltd.;OutKast Solutions email;internet:[EMAIL PROTECTED] title:Director of Product Development tel;work:+27 21 554 5059 tel;fax:+27 11 252 9197 tel;cell:+27 83 455 9978 url:http://www.outkastsolutions.co.za version:2.1 end:vcard
Re: [lazarus] GamePack 1.0 Released
Dominique Louis wrote: Hi A.J. You may want to post about your project over on www.pascalgamedevelopment.com. There was talk on there about trying and release a game development pack that would allow FreePascal to target Nintendo GameBoy Advance and Dual Screen. Well gamepack per se won't do that, BUT if FreePascal AND lazarus supports building for those platforms, then it should work on those ports (because it's built out of native components). It should already work for WinCE. Ciao A.J. -- Any sufficiently advanced technology is indistinguishable from magic - Clarke's law Any technology that is distinguishable from magic is insufficiently advanced -Gehm's corollary Any technologist that is distinguishable from a magician is insufficiently advanced - My corollary The worlds worst webcomic: http://silentcoder.co.za/scartoonz The worlds best cybercafe manager: http://outkafe.outkastsolutions.co.za begin:vcard fn:AJ Venter n:Venter;AJ org:Global Pact Trading Pty. Ltd.;OutKast Solutions email;internet:[EMAIL PROTECTED] title:Director of Product Development tel;work:+27 21 554 5059 tel;fax:+27 11 252 9197 tel;cell:+27 83 455 9978 url:http://www.outkastsolutions.co.za version:2.1 end:vcard
[lazarus] GamePack 1.0 Released
Hi all, As I promised last week, I finished and released GamePack version 1.0. The keyboard event handling is not yet as good as I would like, but this is not a crucial aspect as it's something that belongs on the lazarus level anyway. Having said that, the other functionalities are all there as promised including the event-based collision detection and sprite-motion control. I am still busy writing new up-to-date documentation, but the included demoprogram shows how to use all the abilities in all the components. I already have an idea for my next major addition, but this will be for a later release. In the meantime, those who wanted to play with it can now get it to take a look. The URL is: http://outkastsolutions.co.za/outkast/index.php?option=com_openwikiItemid=id=gamepack I would like it if it could be added to the CCR as well please to help people find it. I would love to receive feedback on this release. It's far from perfect, in particular the code-structure could use some clean-up and improved error detection, but provided the programmer uses it right, everything seems to work very well. That's not to say it cannot be improved but I would really like to get some outside input with this, yet another reason I am releasing it. I think it is a justified .0 release and I hope people will find it useful. Ciao A.J. -- Any sufficiently advanced technology is indistinguishable from magic - Clarke's law Any technology that is distinguishable from magic is insufficiently advanced -Gehm's corollary Any technologist that is distinguishable from a magician is insufficiently advanced - My corollary The worlds worst webcomic: http://silentcoder.co.za/scartoonz The worlds best cybercafe manager: http://outkafe.outkastsolutions.co.za -- Any sufficiently advanced technology is indistinguishable from magic - Clarke's law Any technology that is distinguishable from magic is insufficiently advanced -Gehm's corollary Any technologist that is distinguishable from a magician is insufficiently advanced - My corollary The worlds worst webcomic: http://silentcoder.co.za/scartoonz The worlds best cybercafe manager: http://outkafe.outkastsolutions.co.za begin:vcard fn:AJ Venter n:Venter;AJ org:Global Pact Trading Pty. Ltd.;OutKast Solutions email;internet:[EMAIL PROTECTED] title:Director of Product Development tel;work:+27 21 554 5059 tel;fax:+27 11 252 9197 tel;cell:+27 83 455 9978 url:http://www.outkastsolutions.co.za version:2.1 end:vcard
Re: [lazarus] Wider use case for gamepack ?
And please forgive me for not living in the past. OpenGL accelerated desktops far beyond what compiz/aero/etc can do are the future. And I am not getting tired of promoting OpenGL. FPC works with OpenGL very nicely and can deliver high quality and high performance graphics as good as any C/C++ application. We just need to show this to the masses. You win people with eye-candy as Ubuntu has shown. Once again it is not against AJs GamePack (it has its purpose and target audience), but it is to show that nowadays graphics are done different than more than 10 years ago. Background, background, background. I spent the previous 5 years of my life developing software to run on thin-client machines. My current major project is frequently used on them. In other words -less than 1% of MY userbase HAS openGL capable hardware. The same goes for many others, including those who are writting for embedded platforms (there is no reason why gamepack shouldn't work fine with lazarus for WinCE). Stating that there is a more modern technology for many uses, does not invalidate the use-case NOT met by that technology. We've had cars for over a hundred years... so why do people still ride bycicles ? Why are bycicles today so much more advanced than a hundred years ago ?Why did people keep researching, improving and refining a technology when there was another one that was so much more powerful ? Because it had a few small advantages that cars don't have (for starters, a 3 year old can learn to use a bycicle safely) - and while this may be a minority case, in over a century those use-cases have, if anything, INCREASED. So in the same spirit don't think developing 2D graphics suites in the age of 3D is a step back, it's merely a step forward in a different direction, for those times when you want to be somewhere else. Anyway, I've said my piece I think. No need to start a flamewar here. I'll be releasin 1.0 soon to the CCR whence it can follow it's own path. From now on though, I will only discuss it on the list when people have tecnical questions, or I want advice on solving technical problems., not in terms of the merit of it's existence. A.J. -- A.J. Venter Director of Product Development Tel.: +27 21 554 5059 Fax: +27 11 252 9197 Outkast Solutions IT www.outkastsolutions.co.za A division of Global Pact Trading Pty Ltd. www.silentcoder.co.za - Blog scartoonz.silentcoder.co.za - ScarToonz webcomic _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Wider use case for gamepack ? [LCL Keyboard handling discussion]
TForm only get's the events from the keyboard if KeyPreview is set, IIRC. Apparently it's not a good way to go because enforcing key preview on the form may spoil some other techniques or hinder existing programs from working. I hope someone having intimate LCL knowledge can jump in here and suggest a less intrusive approach... Well unless I receive it within a few hours :) I'm going to publish the code as I have it now. The fact there is a way to do it via the form (though if I was unaware of it previously) takes this from an urgent priority feature to a nice-to-have one. It may not be the perfect answer, but we can always try to find THAT later :) A.J. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Wider use case for gamepack ?
First of all, I never wanted to bash your components and I think the CCR is a good place for them. I just don't think that it should be shipped with lazarus. And you have every right to be proud of your work. Fair enough. I didn't think it was being bashed, just that I needed to explain their purpose and features. 2) As a result of 1, things like image scaling is already there - just use the same calls you would have used before to manipulate the sprite in ram before blitting. And as a result of 1 blending misses. I'm not sure what you mean by this. This is a toolkit for 2D games, like pacman or animated scenes in your app. Tilebased games etc. work fine, why do you need blending in this environment? Sounds good, only that the CPU instead of the GPU is doing the graphics work is so old school. Btw how do you asure that a games runs at the same speed on different machines if you don't measure/have a framerate? Not everybody HAS a gpu. Even if everybody did, that's not my target audience or developer. I use a ttimer to handle all the screen updates, on each timer the user's character sprite is moved as per his request, ditto the game character sprites - and finally we flip the buffers - so in a sense there IS a fixed framerate - since there is a fixed number of screen updates per second- but it can be intercepted by other events if needed. In the openGL type idea though where you repaint as often as possible - there isn't really a framerate. 4) Lazarus native event handling - e.g. there is NO need for me to handle key/mouse events- lazarus does, and any device that works with lazarus toolkit you're using on the OS you are using will ALSO work. That's what I am using, too, at the moment and I am not really impressed. You can get mouse and more or less key input but that's it. Sounds ok, but I don't consider this a killer feature. More complex games demand a level editor nonetheless. True enough, and that is easy to write and load, but having onscreen design makes it easier to write the game that will load the level editor. In my tests I came to the conclusion, that epiktimer is the only usable timer (very nice component), as the other timing methods seriously lack accuracy. TTimer worked for me - but then at 41ms you'r close enough to 25FPS. It depends on your game. Ease of use is always a good thing. But the power you give the game designer comes with the drawback that he can put his graphics card in sleep mode. This is only a drawback if he has one. 12) Because it uses lazarus components, you can put other components on top of the gamearea, and you can allow sprites to move across one another in a pseudo 3D way (remember the old siera games?) - but there is no need to create a complex mapfile overlay to do it - just adjust the ZOrder of the components (be they sprites or buttons) to put what you want on top. ZBuffers are standard in hw accelerated rendering. Meaning you get this out of the box with OpenGL. And not only in pseuodo but in real 3D if you like I merely pointed out that you can do what siera did without the complexity of code. If you want real 3D then you use opengl, if you want to write a clone of kings quest, you use gamepack. 13) And all this with remarkably little overhead - the worst part is the ram to store loaded images - but if you're a little smart, even that is small. If you are even smarter the images are stored in the RAM of your graphics card. Okay I get it - you like using the graphics card :) If I find the time I give your gamepack a try. But please remeber that OpenGLSDL. They have nothing to do with each other except that SDL provides a wrapper for the OpenGL API. Keep coding. I am well aware that SDL OpenGL - that is why I compared my suite to SDL and NOT to openGL. It isn't OpenGL nor is it meant to be. We already HAVE an OpenGL that works wonderfully. This is a toolkit that's meant to do the same work the SDL does when you do NOT use the OpenGL wrapper. I also don't intend to add an OpenGL wrapper to gamepack since the environment it's created for (Lazarus) already contains one. The reason people use SDL with OpenGL is to tap into it's event handlers and such - since they are no longer using it's graphics features. This wouldn't make any sense in GamePack as gamepack is JUST the graphics features(specifically it's THOSE graphics features that are NOT already in lazarus - like a twin-buffer screen) and some powerful utility components to automate blitting and motion controlls. -- Any sufficiently advanced technology is indistinguishable from magic - Clarke's law Any technology that is distinguishable from magic is insufficiently advanced -Gehm's corollary Any technologist that is distinguishable from a magician is insufficiently advanced - My corollary The worlds worst webcomic: http://silentcoder.co.za/scartoonz The worlds best cybercafe manager: http://outkafe.outkastsolutions.co.za
Re: [lazarus] Wider use case for gamepack ?
John Stoneham wrote: On Jan 30, 2008 1:00 AM, A.J. Venter [EMAIL PROTECTED] wrote: [...] Anyway, I think I explained now what makes it special in depth. Either the dev's will think it's cool, or they won't. I won't feel bad if they don't - it's their prerogative, but at least let it be judged fairly. Well, *I* think it's very cool. In fact, when I get back around to my life-long pet project (a chess engine extraordinaire :) this will be the first library I look at for the board UI. Thanks, it's nice to have a vote of confidence- a chess board will not even need half the features :) I finished the collisionDetection system today. Now only two things remain on my 1.0 TODO list. 1) The events from the colisionDetection, that's pretty easy, just set up some TNotifyEvents. 2) THIS is the tricky one so I would like some advice on how I should do it. TDoubleBuffer needs to have OnKeyDown,OnKeyUp and OnKeypressed events. Being a TCustomControl descendent, it doesn't have them - TControl does - but it doesn't have a paint handler. Basically - there is no component that has a paint handler that also handles key input. In the Delphi world people get around this by using callbacks and hooks. That's fine, if you are only on windows. Now sure, I could probably go put in a bunch of IFDEF's and try to emulate them on each of the widgetsets... but somehow I don't think that's the right way. The other way I can think of is to just code the keyboardEvents in, by copying and pasting from one of the components that do have it - that seems like clutter though - code duplication is never a good idea right. So is there a third way I haven't thought of ? I am very open to suggestions and I'm sure somebody here knows something I don't :) Ciao A.J. -- Any sufficiently advanced technology is indistinguishable from magic - Clarke's law Any technology that is distinguishable from magic is insufficiently advanced -Gehm's corollary Any technologist that is distinguishable from a magician is insufficiently advanced - My corollary The worlds worst webcomic: http://silentcoder.co.za/scartoonz The worlds best cybercafe manager: http://outkafe.outkastsolutions.co.za begin:vcard fn:AJ Venter n:Venter;AJ org:Global Pact Trading Pty. Ltd.;OutKast Solutions email;internet:[EMAIL PROTECTED] title:Director of Product Development tel;work:+27 21 554 5059 tel;fax:+27 11 252 9197 tel;cell:+27 83 455 9978 url:http://www.outkastsolutions.co.za version:2.1 end:vcard
Re: [lazarus] Wider use case for gamepack ? [LCL Keyboard handling discussion]
Me too, I'd like to play around and maybe do something useful (or funny :) with it. It could at least be put on the CCR if not into lazarus distribution itself. That may be a good start. I'll submit it to the CCR as soon as I finish 1.0 Please note I combined two posts below: How about a middle ground: create a new TKeyboardEvents unit using code from one of the components that already has it. Yes you will have the initial code duplication in creating the unit in the first place, but this would allow adding keyboard events to other controls simply by inheriting from the base class. In fact, this may be something that the LCL could use and incorporate itself in the future, if you get it working property. I'm not sure about this one - as it would mean anything that needs keyboardevents cannot be descended from anything else (e.g. a customControl or it's descendents like tpicture). However it might be possible to create a small component TKeyboardListener or something that DOES have these events, can take focus but isn't actually VISIBLE(is this last bit possible ? Perhaps if you hardcode it's width and height properties to be locked to 0) . Then anybody who needs to capture keyEvents globally would be able to drop one on a form and use it, and components like TDoubleBuffer could just instantiate one (or hook into one through a property - perhaps better). This would actually I think be an incredibly useful GENERAL add-on to the LCL as it would create a platform independent way of doing what windows coders do with callbacks and hooks. Somebody with deeper LCL knowledge want to comment on this ? I haven't looked into the sources deeply, but can't you override some OnKeyXxx-methods to get the key events? I don't think there ARE any to overwrite- perhaps in the parent class for TCustomControl, but they aren't republished. If you use override though - you may as well rewrite them as you'll need to do the same work anyway - it doesn't solve the clutter-and-duplicate problem. If not, maybe hooking into the surrounding forms events would suffice. This was my first idea, but unfortunately, it doesn't work at all. The reason is that forms only get keyboard focus onActivate and even then they only keep it if there is no focusable components - else it's hardpassed to the component with focus preference. Running Form.SetFocus throws an exception (Form cannot take focus) - [why is it there if it cannot be called ?] If there is a way to make a form take keyboard focus to itself so it's keyEvents work even if there are focusable components on it then I haven't found it yet. Ciao A.J. -- Any sufficiently advanced technology is indistinguishable from magic - Clarke's law Any technology that is distinguishable from magic is insufficiently advanced -Gehm's corollary Any technologist that is distinguishable from a magician is insufficiently advanced - My corollary The worlds worst webcomic: http://silentcoder.co.za/scartoonz The worlds best cybercafe manager: http://outkafe.outkastsolutions.co.za begin:vcard fn:AJ Venter n:Venter;AJ org:Global Pact Trading Pty. Ltd.;OutKast Solutions email;internet:[EMAIL PROTECTED] title:Director of Product Development tel;work:+27 21 554 5059 tel;fax:+27 11 252 9197 tel;cell:+27 83 455 9978 url:http://www.outkastsolutions.co.za version:2.1 end:vcard
Re: [lazarus] Introduction - NOTE FOR GRAHAM
Thanks for the response AJ. The other factor that comes into play is that we had lots of IFDEF's in our old code when we used Delphi and Kylix. Moving over to Lazarus we had the intent of not needing IFDEF's again as we run on mixed platforms. The above is a possible solution, but not ideal. ;-) Hiya Graham, Well I wasn't actually saying it would be the answer for you right now - but I wanted to fix the misconception - it is possible to use a custom theme for just your program, ship it with it etc. In fact in some earlier versions of direqcafe I did that. Nowadays I use gtk2 for it and that nowadays already has the features I need. As for the whole 'native-look' debate: One thing keeps coming up in usability studies - every app on the user's desktop should behave the same to the largest possible extent. So the user does not need to learn how to navigate 20 types of file open dialogs. More and more even disparate systems like Linux is pursuing this - a kde distro will ship as few gnome apps as it can get away with - so the apps will behave the same - ditto for a gnome one. Now lazarus here offers the ability to create multi-platform apps that NEVERTHELESS blend into the desktop the user is using - that is a good thing in 99% of the cases. In fact the ONLY use case where it breaks down is the mixed environment - where people use the same app on many systems in the same place as a major app. There consistency for the app across environments becomes a higher priority. This use-case remains however by far the minority one. This is YOUR use-case though, and at least one other person here has the same one. So for you - the current lazarus falls short. For the rest of us - it's doing exactly what OUR users actually DEMAND. But, FPgui is well on it's way to fully supporting your use-case - and once it's LCL linked, lazarus will be able to meet either use-case. My time is rather limited, but (although I don't need it myself) I would like to help make this happen - so that lazarus can have yet another major capability - native-look or app-consistent becomes a choice of the developer based on the needs of HIS user-base. Can you mail me offlist with some of the priority missing pieces ? Then if I have time, I can send you back some patches to help it along. Ciao A.J. -- Any sufficiently advanced technology is indistinguishable from magic - Clarke's law Any technology that is distinguishable from magic is insufficiently advanced -Gehm's corollary Any technologist that is distinguishable from a magician is insufficiently advanced - My corollary The worlds worst webcomic: http://silentcoder.co.za/scartoonz The worlds best cybercafe manager: http://outkafe.outkastsolutions.co.za begin:vcard fn:AJ Venter n:Venter;AJ org:Global Pact Trading Pty. Ltd.;OutKast Solutions email;internet:[EMAIL PROTECTED] title:Director of Product Development tel;work:+27 21 554 5059 tel;fax:+27 11 252 9197 tel;cell:+27 83 455 9978 url:http://www.outkastsolutions.co.za version:2.1 end:vcard
Re: [lazarus] Introduction
Have a look on SourceForge. I have seen quite a few toolkits implemented in C/C++ and uses OpenGL or SDL or whatever hw acceleration they picked. Eeeek ! Components should NOT require hardware acceleration support ! There is still a significant number of computers without this feature. The brand new AMD64 I bought at the beginning of the year had an onboard card with no acceleration support ! I did add an nvidia card of my own so it didn't bother me - but to limit lazarus applications to only those machines with accelerated 3D would simply be a massively stupid thing for at least another 5 years. If you want hardware accelerated rendering - do it (optionally) on the graphical system level - that's the direction that composition managers, VISTA etc. all went - because the alternative is to start making a very expensive piece of extra hardware a requirement to even running the programs, even if they do not actually DO anything three dimensional. A.J. -- Any sufficiently advanced technology is indistinguishable from magic - Clarke's law Any technology that is distinguishable from magic is insufficiently advanced -Gehm's corollary Any technologist that is distinguishable from a magician is insufficiently advanced - My corollary The worlds worst webcomic: http://silentcoder.co.za/scartoonz The worlds best cybercafe manager: http://outkafe.outkastsolutions.co.za begin:vcard fn:AJ Venter n:Venter;AJ org:Global Pact Trading Pty. Ltd.;OutKast Solutions email;internet:[EMAIL PROTECTED] title:Director of Product Development tel;work:+27 21 554 5059 tel;fax:+27 11 252 9197 tel;cell:+27 83 455 9978 url:http://www.outkastsolutions.co.za version:2.1 end:vcard
Re: [lazarus] why do delphi users hate lazarus so much?
Hi all, Well I've read this thread with interest, and now I want to interject. I learned pascal on my own in primary school. In high school I studied it much further. Then I entered university and it was all java (which I grew to hate). I began to work professionally, and learned many languages, I actually maintained some fpc projects right in the beginning - one of which was direqcafe - despite my job being in other languages, I loved pascal as an old friend and having fpc let me contribute to and learn linux development when nobody had heard of it with a much reduced learning curve - because I knew the language inside out from (by then) over 10 years experience. Later on, lazarus matured to the point where I rewrote direqcafe in it as a graphical app - and it was amazing. I have never even USED delphi - I was a poor coder in a poor country and lazarus let me learn OP and graphical programming on my own time with zero budget ! So I got better and better, and now there are some components included in lazarus which I wrote and some I helped others to write. Last year, I quit my job and founded a small development company called outkast solutions. My first (open source) project was outkafe - a newly redone direqcafe - a project that now has well over 10 thousand sites using it world wide - most of them in poor countries. If you go to a cybercafe in brazil there's a good chance it's using outkafe to manage them (I know of at least 5 in Sao Paulo and that's just the ones who mailed me to thank me - who knows how many others). I make my money by doing customized versions for customers, if they pay extra I give them the copyright to their version to license as they see fit. My biggest customization project just signed a deal which will see over 1000 cybercafe's built in the DRC using a derivative of outkafe with some extra features. In other words: I run a highly successful business (profitable in it's first year - almost unheard of) using lazarus, in fact, using EXCLUSIVELY free (as in speech AND beer) software ! I could never have done this if my overheads included thousands of USD (at 6 times the price + distance cost = about 10 times the price) in license fees. And the software I run my business on are not poor second rate stuff. Quasar accounting is absolutely perfect, even me who only has 8th grade accounting can keep my books up to legal requirements with hardly any effort, and lazarus lets me develop stable usable software that people are using. Lazarus is not a poor second cousin to delphi. It's the future of object pascal and it's abilities hugely exceed what you need to do successful, profitable development work. Yes there are features I would like to see - when I identify them, I try to help add them - I can actually DO that! In fact, I would say delphi could never have worked in my field because I consider THAT the killer feature. Whatever delphi cannot do - and that cannot be handled by a component - a delphi developer cannot do. In lazarus - if I need it, I add it. The closest thing to a grip I can have with lazarus if that it develops SO fast, that I am actually struggling to keep up to date with new features, I haven't even had a chance to study the new localization system yet so I can stop using the old one which is in outkafe. This is definitely much better than the alternative - developing so slow that people start to wonder if you ARE developing. I don't want to flame delphi, I want to state to all who flame lazarus that frankly lazarus puts bread on my plate, and delphi could not have - for several reasons, of which the most critical to me is that I can actually add the features I need to lazarus myself if they aren't there. I am actually fairly dogmatic about free software (in the FSF sense) - but I couldn't have afforded to BE that way if it could not do what my business requires - lazarus in particular provides the key single product my business relies on. Ciao A.J. -- Any sufficiently advanced technology is indistinguishable from magic - Clarke's law Any technology that is distinguishable from magic is insufficiently advanced -Gehm's corollary Any technologist that is distinguishable from a magician is insufficiently advanced - My corollary The worlds worst webcomic: http://silentcoder.co.za/scartoonz The worlds best cybercafe manager: http://outkafe.outkastsolutions.co.za begin:vcard fn:AJ Venter n:Venter;AJ org:Global Pact Trading Pty. Ltd.;OutKast Solutions email;internet:[EMAIL PROTECTED] title:Director of Product Development tel;work:+27 21 554 5059 tel;fax:+27 11 252 9197 tel;cell:+27 83 455 9978 url:http://www.outkastsolutions.co.za version:2.1 end:vcard
Re: [lazarus] Introduction - NOTE FOR GRAHAM
I remember I was told to use a custom theme file, but that would change it for all application, and I needed to change colors based on data entered in forms (validation things), so that solution was totally useless. Sorry for the late response, I am backreading a bit - but I thought you should know this is NOT needed. gtkproc unit has a call load_rc I think which you can call in your application to load a custom theme file in a sepperate location for the running app ONLY. Not ideal, but a work-around for gtk1 cases perhaps ? A.J. -- Any sufficiently advanced technology is indistinguishable from magic - Clarke's law Any technology that is distinguishable from magic is insufficiently advanced -Gehm's corollary Any technologist that is distinguishable from a magician is insufficiently advanced - My corollary The worlds worst webcomic: http://silentcoder.co.za/scartoonz The worlds best cybercafe manager: http://outkafe.outkastsolutions.co.za begin:vcard fn:AJ Venter n:Venter;AJ org:Global Pact Trading Pty. Ltd.;OutKast Solutions email;internet:[EMAIL PROTECTED] title:Director of Product Development tel;work:+27 21 554 5059 tel;fax:+27 11 252 9197 tel;cell:+27 83 455 9978 url:http://www.outkastsolutions.co.za version:2.1 end:vcard
Re: [lazarus] Introduction
MSEide+MSEgui is designed with the goal to provide identical look and feel on Linux and win32: http://sourceforge.net/projects/mseide-msegui/ Another main focus of MSEide+MSEgui are database components. Does it support lazarus components however ? I wouldn't even THINK of using it if I couldn't use the custom components I developed for lazarus - the ones included in lazarus now as well as the ones I just use myself. A.J. -- Any sufficiently advanced technology is indistinguishable from magic - Clarke's law Any technology that is distinguishable from magic is insufficiently advanced -Gehm's corollary Any technologist that is distinguishable from a magician is insufficiently advanced - My corollary The worlds worst webcomic: http://silentcoder.co.za/scartoonz The worlds best cybercafe manager: http://outkafe.outkastsolutions.co.za begin:vcard fn:AJ Venter n:Venter;AJ org:Global Pact Trading Pty. Ltd.;OutKast Solutions email;internet:[EMAIL PROTECTED] title:Director of Product Development tel;work:+27 21 554 5059 tel;fax:+27 11 252 9197 tel;cell:+27 83 455 9978 url:http://www.outkastsolutions.co.za version:2.1 end:vcard
Re: [lazarus] why do delphi users hate lazarus so much?
Wow, this is a great success story! I hope you don't mind, but I've added your project to the wiki of 3rd-party projects developed with Lazarus (feel free to edit it): http://wiki.lazarus.freepascal.org/Projects_using_Lazarus#OutKafe Maybe you could add a screenshot or two here: http://wiki.lazarus.freepascal.org/Lazarus_Application_Gallery I thought it was already on both ? A.J. -- Any sufficiently advanced technology is indistinguishable from magic - Clarke's law Any technology that is distinguishable from magic is insufficiently advanced -Gehm's corollary Any technologist that is distinguishable from a magician is insufficiently advanced - My corollary The worlds worst webcomic: http://silentcoder.co.za/scartoonz The worlds best cybercafe manager: http://outkafe.outkastsolutions.co.za begin:vcard fn:AJ Venter n:Venter;AJ org:Global Pact Trading Pty. Ltd.;OutKast Solutions email;internet:[EMAIL PROTECTED] title:Director of Product Development tel;work:+27 21 554 5059 tel;fax:+27 11 252 9197 tel;cell:+27 83 455 9978 url:http://www.outkastsolutions.co.za version:2.1 end:vcard
Re: [lazarus] Okay, well I am willing to contribute something to Lazarus. Who should I talk to?
Warren Postma wrote: There is something I'd like to see that I'm willing to work with other people, and contribute my time to. What I'm interested in is a 100% native carbon, 0% gtk/x-windows Lazarus for Mac OS X. Is there a Mac-OS-Lazarus mailing list? I'll join it. I've gotten the GTK version of Lazarus built from latest repository sources, and it runs, so I'm willing to build and/or debug/fix the missing or broken bits of Carbon-LCL framework that are needed to get a native-Carbon-LCL finished to the point that you can build Lazarus using it. Start with the wiki page: http://wiki.lazarus.freepascal.org/Carbon_Interface Ciao A.J. -- Any sufficiently advanced technology is indistinguishable from magic - Clarke's law Any technology that is distinguishable from magic is insufficiently advanced -Gehm's corollary Any technologist that is distinguishable from a magician is insufficiently advanced - My corollary The worlds worst webcomic: http://silentcoder.co.za/scartoonz The worlds best cybercafe manager: http://outkafe.outkastsolutions.co.za begin:vcard fn:AJ Venter n:Venter;AJ org:Global Pact Trading Pty. Ltd.;OutKast Solutions email;internet:[EMAIL PROTECTED] title:Director of Product Development tel;work:+27 21 554 5059 tel;fax:+27 11 252 9197 tel;cell:+27 83 455 9978 url:http://www.outkastsolutions.co.za version:2.1 end:vcard
[lazarus] Wider use case for gamepack ?
Hi all, I've been working on my gamepack component package for a long time (nearly 4 years now) and it's quite a nice set. Not perfect of course, but it's two components for gametype graphics do work very nicely. Gamepack provides the following components: TDoubleBuffer: A doublebufferd drawing area. Changes are made to a memory buffer, and not shown on screen until you call the TDoubleBuffer.flip method, allowing for flickerless animations. Much the same kind of structure as the doublebuffered screen in SDL. TDoubleBuffer can be drawn to with all standard LCL drawing functions, and can load a background image from file straight of the bat. Additionally two blit methods are provided, one blitting any canvas you want, with a bunch of parameters to control how it gets blitted, and one blitting a tsprite and taking all those parameters from the properties of the sprite so you can control animations by ONLY updateing the sprite objects. Finally the there is mask method, which takes a tsprite as a parameter, on run it will automatically blit the background over the sprite's current location, so that the next sprite blit will not leave a trail. TSPrite: A sprite handling component that can handle multiframe animated sprites automatically. It encapsulates a TImage which holds the actual sprite image. Sprite images are made by placing each frame alongside the previous one from left to right. The only restriction is that they must all be the same with. The TSPrite.Framewidth property is then set to this value, and by controlling tsprite.frame you can cycle or swith between frames instantly with no overhead. For example if you have tsprite.frame set to 3 and you call tdoublebuffer.blit(tsprite) then it will automatically blit frame 3 for you. The components are fully documented and an example is included, also my tappytux game was written using it and I will soon start working on a loderunner clone using it as well. My question then is whether other people are interested in these lgpl'd components. If so, would you like it to be included with lazarus ? I will happily contribute it if people want it. Ciao A.J. -- Any sufficiently advanced technology is indistinguishable from magic - Clarke's law Any technology that is distinguishable from magic is insufficiently advanced -Gehm's corollary Any technologist that is distinguishable from a magician is insufficiently advanced - My corollary The worlds worst webcomic: http://silentcoder.co.za/scartoonz The worlds best cybercafe manager: http://outkafe.outkastsolutions.co.za begin:vcard fn:AJ Venter n:Venter;AJ org:Global Pact Trading Pty. Ltd.;OutKast Solutions email;internet:[EMAIL PROTECTED] title:Director of Product Development tel;work:+27 21 554 5059 tel;fax:+27 11 252 9197 tel;cell:+27 83 455 9978 url:http://www.outkastsolutions.co.za version:2.1 end:vcard
Re: [lazarus] why do delphi users hate lazarus so much?
Kindly send the website's URL please ;) http://outkafe.outkastsolutions.co.za Ciao A.J. -- Any sufficiently advanced technology is indistinguishable from magic - Clarke's law Any technology that is distinguishable from magic is insufficiently advanced -Gehm's corollary Any technologist that is distinguishable from a magician is insufficiently advanced - My corollary The worlds worst webcomic: http://silentcoder.co.za/scartoonz The worlds best cybercafe manager: http://outkafe.outkastsolutions.co.za begin:vcard fn:AJ Venter n:Venter;AJ org:Global Pact Trading Pty. Ltd.;OutKast Solutions email;internet:[EMAIL PROTECTED] title:Director of Product Development tel;work:+27 21 554 5059 tel;fax:+27 11 252 9197 tel;cell:+27 83 455 9978 url:http://www.outkastsolutions.co.za version:2.1 end:vcard
Re: [lazarus] Wider use case for gamepack ?
I'd be using it, if this components would allow me for a not so game-type solution: Is it possible to draw some shape and connectors in visio-style having text entires inside a border and arrange using some sort of (semi-automatic, self written) layout algorithm? Well there isn't such an algorithm, but if since you can directly use or even blit from any component (depending on need) with gamepack (see my other post) you will find it quite easy to have it do your drawing for you. Think of making a class diagramm, some rectangular shapes with separation lines and texts, some (rectangular or not) connector lines and such. Or some other UML-type diagrams like state charts or so. I don't see anything you couldn't build on it, since this was not my design you'd need to write some event handling code and some drawing code but gamepack will let you do your diagrams nicely I think. And then, if you want to print them, well you just stream TDoubleBuffer.Membuff.Canvas to TPrinter.Canvas. Some of those diagrams would benefit from showing animated graphics and thus your components are interesting. How about something like those two-color-spiral-progress bars, I think thunderbird use[s|d] sth. like that? Easy as pie. That last part is what gamepack is really good at - in fact, that's what it was good at 3 years ago :). Ciao A.J. -- Any sufficiently advanced technology is indistinguishable from magic - Clarke's law Any technology that is distinguishable from magic is insufficiently advanced -Gehm's corollary Any technologist that is distinguishable from a magician is insufficiently advanced - My corollary The worlds worst webcomic: http://silentcoder.co.za/scartoonz The worlds best cybercafe manager: http://outkafe.outkastsolutions.co.za begin:vcard fn:AJ Venter n:Venter;AJ org:Global Pact Trading Pty. Ltd.;OutKast Solutions email;internet:[EMAIL PROTECTED] title:Director of Product Development tel;work:+27 21 554 5059 tel;fax:+27 11 252 9197 tel;cell:+27 83 455 9978 url:http://www.outkastsolutions.co.za version:2.1 end:vcard
Re: [lazarus] Wider use case for gamepack ?
Sounds like you put some serious work into your gamepack, but I don't think that something as specialised as this should be a standard component. Remember that it is only usefull for 2D games on old hardware as you can get all of this (and some nice features more) by using OpenGL for your rendering. All your gamepack can do can be done hardware accelerated on any card that supports OpenGL 1.1 (this means really, really old gfx cards and most newer integrated gfx chips, too). But I have some questions regarding it nonetheless. How do you handle sound, input (keys/mouse/gamepad/etc) and what timing method do you use? How many sprites can be used simultaneously with interactive framerates (30 fps or more)? Do your sprites support rotation and/or scaling? Do your sprites support transparency and blending? If yes, what blending functions? Your case against gamepack is my case for it. If we're going to include opengl, gamepack makes at least as much sense. And gamepack has some VERY advanced features, and lacks some others. So the best idea is to summarize by comparing to SDL (which is most like it I think). Everything on this list is something SDL cannot (ever) DO. 1) Firstly, EVERYTHING is done with lazarus native calls and components - this means you don't need any issues getting buttons to show or menu's design with SDL or anything - whatever you need you just add next to the game window. TSprite is a TCustomControl descended, TDoubleBuffer is descended from TBitMap. 2) As a result of 1, things like image scaling is already there - just use the same calls you would have used before to manipulate the sprite in ram before blitting. 3) Framerates are hard to work out actually as the system is update-on-change so the nature of the game has a massive impact. BUT because of the way it works- the number of sprites have no impact whatsoever on framerates. Each sprite blits when it's changed, and when you've made all the changes you want to show, you flip. This means the 'framerate' is whatever you need. If you flip too much you will seriously abuse the CPU - but you will be hard pressed to get flicker - that's a case of a good design. 4) Lazarus native event handling - e.g. there is NO need for me to handle key/mouse events- lazarus does, and any device that works with lazarus toolkit you're using on the OS you are using will ALSO work. 5) Design your game screens using the form designer. 6) Sprites and backgrounds can be stored in resources or loaded at designtime. 8) TSpriteMover a component that connects to a sprite and a doublebuffer and handlles 'correct' game movement FOR you. You can use multiple instances as well. It can (if you want) do gamescreen constraint allready. It supports full 8-directional movement using toggle-to-go-toggle-to-stop and prevents impossible concepts like left AND right at once. AND it handles animating the sprites, including playing different sets of frames for each direction (again, you can configure this). 9) But it does NOT actually repeat itself, you call TSpriteMover.Move to move the sprite a configurable distance of pixels in the direction(s) you have active. 10) Answering another question: the timer I use in my games is ttimer, but you can use a tthread or anything else that works in lazarus. If you want serious acuracy epiktimer will work just as well. Like I said, gamepack is built with lazarus components and works with them all the way. It's a bit like opengl context in that it sits in a component window, but much easier to do 2D games in because you can drag-and-drop place everything in the form designer (you can also load from files so you can always later change a setting). 11) Very nearly complete is my latest component TConstraintList which lets you store a list of TRects. SpriteMover will (if you have constrained motion on) refuse to enter any of the areas on the double-buffer represented by the coordinates of these trects - any or all of them. And when it 'bump's into one will trigger an event. Whats more it will be able to determine whether the collision was: -edge of screen -An arbitrary area in the list -An area containing another sprite And throw different events. That's right LAZARUS events, so you can immediately do anything you want, including updating other components outside the gamearea - from the coder's point of view, handling collision detection in his game is no more difficult than handling the onClick event of a tbutton. Just think a little about the power this gives a game designer. My little demo app is nearly a little pacman game - in SDL that would need about 15000 lines of new code. In GamePack - I have written less than 200 lines (in the demo itself, not in the units). 12) Because it uses lazarus components, you can put other components on top of the gamearea, and you can allow sprites to move across one another in a pseudo 3D way (remember the old siera games?) - but there is no
Re: [lazarus] porn on lazarus wiki
willem wrote: Well I am a newbie of Lazarus. So i did use the Lazarus Wiki many times. But I did notice that Porn sites did also discoved the Wiki of Lazarus. But the Lazarus Core Developers are not distured by this Fact !!! We are busy evaluating each and every link very, very carefully and studiously. Once we have completed our study, we will remove whatever we deem insufficiently entertaining. Just kidding. I'm guessing we are talking spammers here - perhaps 1) you could send a link so we can clean it up (I'll be happy to help, I use the wiki almost daily and have several page-edits there but I haven't come across the spam yet) 2) Somebody could see about some spam-prevention technology for the wiki ? AJ -- Any sufficiently advanced technology is indistinguishable from magic - Clarke's law Any technology that is distinguishable from magic is insufficiently advanced -Gehm's corollary Any technologist that is distinguishable from a magician is insufficiently advanced - My corollary The worlds worst webcomic: http://silentcoder.co.za/scartoonz The worlds best cybercafe manager: http://outkafe.outkastsolutions.co.za begin:vcard fn:AJ Venter n:Venter;AJ org:Global Pact Trading Pty. Ltd.;OutKast Solutions email;internet:[EMAIL PROTECTED] title:Director of Product Development tel;work:+27 21 554 5059 tel;fax:+27 11 252 9197 tel;cell:+27 83 455 9978 url:http://www.outkastsolutions.co.za version:2.1 end:vcard
[lazarus] StdOut on Linux b0rked
Hi all, I am having an immensely weird problem with newest lazarus (which was definitely not there before). The problem affects only code that makes use of tprocess to get output from a shell-script and feed it back as a function result. It is triggered whenever stdout of the main program is piped. Whether to a file with or to a program with | For some reason the output from tprocess is suddenly all messed up and ends up being random lines from my program's output. This is rather disturbing as I have a large amount of debug info which gets constantly dumped to stdout to allow me to track the process of the program and identify problems with the implementation as it runs. But, should I try to log this data with a pipe, or to seek out a specific fragment with grep, suddenly the tprocess function gets completely confused and I end up with random strings from my own output dumped where the output of a shell-script is meant to be. What could cause this ? A stack overflow in the tprocess ? Any idea where I should look ? Was something in tprocess changed recently ? My tprocess code is almost exactly based on the examples in the tutorial on the lazarus wiki. A.J. -- Any sufficiently advanced technology is indistinguishable from magic - Clarke's law Any technology that is distinguishable from magic is insufficiently advanced -Gehm's corollary Any technologist that is distinguishable from a magician is insufficiently advanced - My corollary The worlds worst webcomic: http://silentcoder.co.za/scartoonz The worlds best cybercafe manager: http://outkafe.outkastsolutions.co.za begin:vcard fn:AJ Venter n:Venter;AJ org:Global Pact Trading Pty. Ltd.;OutKast Solutions email;internet:[EMAIL PROTECTED] title:Director of Product Development tel;work:+27 21 554 5059 tel;fax:+27 11 252 9197 tel;cell:+27 83 455 9978 url:http://www.outkastsolutions.co.za version:2.1 end:vcard
Re: [lazarus] Changing LCL without rebuild Lazarus
Fabio Dell'Aria wrote: Hi to all, I'm working on some LCL changes. To do this I have created some test projects but after every rebuild I see that my projects continue to uses the .ppu unit (do not rebuild my modified LCL sources). How I can instruct Lazarus to rebuild modified LCL sources instead of continue to use LCL .ppu files? Go into the tools menu, rebuild lazarus, and rebuild the lcl :) A.J. -- Any sufficiently advanced technology is indistinguishable from magic - Clarke's law Any technology that is distinguishable from magic is insufficiently advanced -Gehm's corollary Any technologist that is distinguishable from a magician is insufficiently advanced - My corollary The worlds worst webcomic: http://silentcoder.co.za/scartoonz The worlds best cybercafe manager: http://outkafe.outkastsolutions.co.za begin:vcard fn:AJ Venter n:Venter;AJ org:Global Pact Trading Pty. Ltd.;OutKast Solutions email;internet:[EMAIL PROTECTED] title:Director of Product Development tel;work:+27 21 554 5059 tel;fax:+27 11 252 9197 tel;cell:+27 83 455 9978 url:http://www.outkastsolutions.co.za version:2.1 end:vcard
Re: [lazarus] StdOut on Linux b0rked
Nothing was changed. Can you please give some sample code? It's hard to say something in general. Note that or | cannot be used unless you invoke the shell with a commandline like /bin/sh -c your command yourfile I mean when I launch the program myself on the commandline e.g. ./hawkstoneadmin | grep INSERT INTO So the piping should, in theory, have no effect on this call: function GetCanID:String Var StrList: TStringList; Begin execute ('/usr/bin/getcanid.sh',StrList) try GetCanID = StrList[0]; except GetCanID = 'UNSET'; end; The execute procedure is defined as follows: procedure execute (command:string; var output:Tstrings); const READ_BYTES = 2048; Var Process :Tprocess; MemStream : TMemoryStream; n: LongInt; BytesRead: LongInt; begin try Process := TProcess.create(nil);; Process.CommandLine := command; {Actually run the thing and catch the output} MemStream := TMemoryStream.Create; outPut := TStringList.Create; BytesRead := 0; Process.Options := [poUsePipes,poNoConsole]; Process.Execute; while Process.Running do begin // make sure we have room MemStream.SetSize(BytesRead + READ_BYTES); // try reading it n := Process.Output.Read((MemStream.Memory + BytesRead)^, READ_BYTES); if n 0 then begin Inc(BytesRead, n); end else begin // no data, wait 100 ms Sleep(100); end; end; // read last part repeat // make sure we have room MemStream.SetSize(BytesRead + READ_BYTES); // try reading it n := Process.Output.Read((MemStream.Memory + BytesRead)^, READ_BYTES); if n 0 then begin Inc(BytesRead, n); end; until n = 0; MemStream.SetSize(BytesRead); OutPut.LoadFromStream(MemStream); MemStream.Free; Process.Free; except debugln('Could not execute: '+Command); end; end; -- Any sufficiently advanced technology is indistinguishable from magic - Clarke's law Any technology that is distinguishable from magic is insufficiently advanced -Gehm's corollary Any technologist that is distinguishable from a magician is insufficiently advanced - My corollary The worlds worst webcomic: http://silentcoder.co.za/scartoonz The worlds best cybercafe manager: http://outkafe.outkastsolutions.co.za begin:vcard fn:AJ Venter n:Venter;AJ org:Global Pact Trading Pty. Ltd.;OutKast Solutions email;internet:[EMAIL PROTECTED] title:Director of Product Development tel;work:+27 21 554 5059 tel;fax:+27 11 252 9197 tel;cell:+27 83 455 9978 url:http://www.outkastsolutions.co.za version:2.1 end:vcard
Re: [lazarus] StdOut on Linux b0rked
Vincent Snijders wrote: A.J. Venter schreef: Nothing was changed. Can you please give some sample code? It's hard to say something in general. Note that or | cannot be used unless you invoke the shell with a commandline like /bin/sh -c your command yourfile I mean when I launch the program myself on the commandline e.g. ./hawkstoneadmin | grep INSERT INTO So the piping should, in theory, have no effect on this call: function GetCanID:String Var StrList: TStringList; Begin execute ('/usr/bin/getcanid.sh',StrList) is '/usr/bin/getcanid.sh' an executable? Maybe you should use something like: '/bin/sh /usr/bin/getcanid.sh' ? Aye it is, I wrote it myself. And the bangpath is correct as well. A.J. -- Any sufficiently advanced technology is indistinguishable from magic - Clarke's law Any technology that is distinguishable from magic is insufficiently advanced -Gehm's corollary Any technologist that is distinguishable from a magician is insufficiently advanced - My corollary The worlds worst webcomic: http://silentcoder.co.za/scartoonz The worlds best cybercafe manager: http://outkafe.outkastsolutions.co.za begin:vcard fn:AJ Venter n:Venter;AJ org:Global Pact Trading Pty. Ltd.;OutKast Solutions email;internet:[EMAIL PROTECTED] title:Director of Product Development tel;work:+27 21 554 5059 tel;fax:+27 11 252 9197 tel;cell:+27 83 455 9978 url:http://www.outkastsolutions.co.za version:2.1 end:vcard
Re: [lazarus] StdOut on Linux b0rked
Well getcanid.sh is very simple: #!/bin/sh IP=`/sbin/route | grep default | awk '{print $2}'` FALLBACK=x.x.x.x. URIPATH=cgi-bin/getunitinformation.cgi if ! IDLINE=`wget -O - http://$IP/$URIPATH; 2/dev/null | grep UNITID` ; then if ! IDLINE=`wget -O - http://$FALLBACK/$URIPATH; 2/dev/null| grep UNITID 2/dev/null` ; then IDLINE=UNITID=test fi fi UNITID=`echo $IDLINE | awk -F = '{print $2}'` echo $UNITID --- HawkstoneAdmin is just a standard graphical linux application, it never uses stdin as far as I know. It does however make extensive use of unit postgres. I don't know if this could be affecting it. A.J. -- Any sufficiently advanced technology is indistinguishable from magic - Clarke's law Any technology that is distinguishable from magic is insufficiently advanced -Gehm's corollary Any technologist that is distinguishable from a magician is insufficiently advanced - My corollary The worlds worst webcomic: http://silentcoder.co.za/scartoonz The worlds best cybercafe manager: http://outkafe.outkastsolutions.co.za begin:vcard fn:AJ Venter n:Venter;AJ org:Global Pact Trading Pty. Ltd.;OutKast Solutions email;internet:[EMAIL PROTECTED] title:Director of Product Development tel;work:+27 21 554 5059 tel;fax:+27 11 252 9197 tel;cell:+27 83 455 9978 url:http://www.outkastsolutions.co.za version:2.1 end:vcard
Re: [lazarus] Helpfiles for Lazarus apps
I was looking at the relevant source file yesterday and I noticed that if the location of the browser isn't specified it's found by brute force. When running under Win-32 I've used ShellExecuteEx() which automagically associates an http: prefix with an HTML viewer: does anybody know whether KDE etc. exposes an API (dcom/dbus etc.) that can do this? They all do, but none of them share it. Gnome shares the default browser from gconf, kde you can use kfmclient which will revert back to the configured one, every other desktop doesn't do anything like that at all. Pretty much every file manager not part of either gnome or KDE uses brute force or 'you have to configure it' approach. There was an attempt by ESR a few years ago to get a BROWSER environment variable standardized, so all apps could simply refer to $BROWSER and get the user's preferred default one. I have no idea why it didn't take off, but it didn't - sad because it would have been an ideal solution. Perhaps the code should be expanded to check for the existence of $BROWSER first, and THEN start brute-forcing command names ? Other than that, it really cannot be much better than it is. Sorry. A.J. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] New bitmap :-)
It's an optional component included with Lazarus (look under the components subdirectory in your $LAZDIR), used for showing baloon-help windows. Me and Felipe wrote it for lazarus. A.J. On 12/6/07, Paul Ishenin [EMAIL PROTECTED] wrote: A.J. Venter wrote: Well, Here is mine for TPopupNotifier - if somebody can make one that is actually pretty, I won't mind :p Sorry, what is TPopupNotifier? Where can I find it? Best regards, Paul Ishenin. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives -- A.J. Venter Director of Product Development Tel.: +27 21 554 5059 Fax: +27 11 252 9197 Outkast Solutions IT www.outkastsolutions.co.za A division of Global Pact Trading Pty Ltd. www.silentcoder.co.za - Blog scartoonz.silentcoder.co.za - ScarToonz webcomic _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] New bitmap :-)
Well, Here is mine for TPopupNotifier - if somebody can make one that is actually pretty, I won't mind :p A.J. On 12/5/07, wile64 [EMAIL PROTECTED] wrote: tchu tchu more. :-) -- Laurent. My Components: http://wiki.lazarus.freepascal.org/Wile64 French Forum : http://lazforum-fr.tuxfamily.org/index.php -- A.J. Venter Director of Product Development Tel.: +27 21 554 5059 Fax: +27 11 252 9197 Outkast Solutions IT www.outkastsolutions.co.za A division of Global Pact Trading Pty Ltd. www.silentcoder.co.za - Blog scartoonz.silentcoder.co.za - ScarToonz webcomic attachment: tpopupnotifier.png
Re: [lazarus] SOAP DateTime
Okay, So could it be that the problem is that my computer is NOT on Zulu time ? Should I specify SAST (and is that the right code for it ?) or convert TO Zulu time first ? SAST is GMT+2 (no idea how much it is ahead/behind Zulu right now). This at least will be important to ensure the syncs are right later. But I still can't be sure why I am getting error 400's :S A.J. On 12/4/07, Jeff Steinkamp [EMAIL PROTECTED] wrote: - Original Message - From: A.J. Venter [EMAIL PROTECTED] To: lazarus@miraclec.com Sent: Tuesday, December 04, 2007 00:55 Subject: [lazarus] SOAP DateTime Hi guys, I'm busy writing a SOAP client, and I'm a little stuck formatting a datetime to be SOAP compatible. What SHOULD a SOAP datetime string look like ? Is there a function to produce one from a TDateTime ? I tried to write a simple FormateDateTime function to do it, but I must have a detail wrong because I keep getting http-400 (bad request) errors. Here is a sample generated by my current code: FromDateTime2007-12-03T15:10:45.000Z/FromDateTime Does anybody know how it should be changed ? A.J. PS. The Z I found in a website sample which I used to generate this much... what does it mean ? -- The Z stands for Zulu time or UTC. This is the time at the prime meridian that runs north and south at the 0 degree longitude line. Most computer systems maintain their time on UTC/Zulu so everyone is on the same sheet of music when comparing datetime stamps. Jeff _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives -- A.J. Venter Director of Product Development Tel.: +27 21 554 5059 Fax: +27 11 252 9197 Outkast Solutions IT www.outkastsolutions.co.za A division of Global Pact Trading Pty Ltd. www.silentcoder.co.za - Blog scartoonz.silentcoder.co.za - ScarToonz webcomic _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] SOAP DateTime
Hi guys, I'm busy writing a SOAP client, and I'm a little stuck formatting a datetime to be SOAP compatible. What SHOULD a SOAP datetime string look like ? Is there a function to produce one from a TDateTime ? I tried to write a simple FormateDateTime function to do it, but I must have a detail wrong because I keep getting http-400 (bad request) errors. Here is a sample generated by my current code: FromDateTime2007-12-03T15:10:45.000Z/FromDateTime Does anybody know how it should be changed ? A.J. PS. The Z I found in a website sample which I used to generate this much... what does it mean ? -- A.J. Venter Director of Product Development Tel.: +27 21 554 5059 Fax: +27 11 252 9197 Outkast Solutions IT www.outkastsolutions.co.za A division of Global Pact Trading Pty Ltd. www.silentcoder.co.za - Blog scartoonz.silentcoder.co.za - ScarToonz webcomic _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Lazarus/FPC and SDL on W32 and Linux
on 10/31/07, David Pethes [EMAIL PROTECTED] wrote: Hi, bembulak wrote: Is there some kind of userbase/community on game-programming and lazarus/FPC? Check out http://www.pascalgamedevelopment.com/ , especially the forum section. You can use the jedi-sdl pascal headers for cross-platform SDL+FPC development. Best regards, There is also the sdl4fp headers http://sdl4fp.sourceforge.net/ which are h2pas conversions, though I think they may be outdated now. If you would prefer native lazarus components then gamepack may suit you. Somebody also had a post here earlier this week about an SDL framework from XCode - I don't know if that is mac specific or general though - perhaps somebody could provide a link ? A.J. -- A.J. Venter Director of Product Development Tel.: +27 21 554 5059 Fax: +27 21 413 2800 Outkast Solutions IT www.outkastsolutions.co.za A division of Global Pact Trading Pty Ltd. www.silentcoder.co.za - Blog scartoonz.silentcoder.co.za - ScarToonz webcomic _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] LD_PRELOAD
Hi guys, I need to intercept some system calls, and then wrap the results into my bigger lazarus application. I have a skeleton C library that can intercept the functions (using LD_PRELOAD). This code is very incomplete however. So now I have two choices 1) I write the missing parts in C, and then let my app merely handle output 2) I rewrite the C library as a lazarus library, and then build that. I would prefer the latter, but before I go to all that trouble, I felt it is worth checking if lazarus libraries will even WORK with LD_PRELOAD (I can't imagine they won't but it's worth checking). The functions in question are part of glibc socket handling. Very similar (though I doubt identical) to some of the things in the fpc sockets unit - the c-library only imports the socket.h header, is this the same as the fpc sockets unit ? Ciao A.J. -- Any sufficiently advanced technology is indistinguishable from magic - Clarke's law Any technology that is distinguishable from magic is insufficiently advanced -Gehm's corollary Any technologist that is distinguishable from a magician is insufficiently advanced - My corollary The worlds worst webcomic: http://silentcoder.co.za/scartoonz The worlds best cybercafe manager: http://outkafe.outkastsolutions.co.za begin:vcard fn:AJ Venter n:Venter;AJ org:Global Pact Trading Pty. Ltd.;OutKast Solutions email;internet:[EMAIL PROTECTED] title:Director of Product Development tel;work:+27 21 554 5059 tel;fax:+27 21 413 2800 tel;cell:+27 83 455 9978 url:http://www.outkastsolutions.co.za version:2.1 end:vcard
Re: [lazarus] Any idea why this is going wrong ?
HTTP := THTTPSend.Create; U := AnsiToUTF8(S); HTTP.Document.StrWrite(Pchar(U)); I got it fixed this morning using: S :TStringList ... S.SaveToStream(http.Document); -- Any sufficiently advanced technology is indistinguishable from magic - Clarke's law Any technology that is distinguishable from magic is insufficiently advanced -Gehm's corollary Any technologist that is distinguishable from a magician is insufficiently advanced - My corollary The worlds worst webcomic: http://silentcoder.co.za/scartoonz The worlds best cybercafe manager: http://outkafe.outkastsolutions.co.za begin:vcard fn:AJ Venter n:Venter;AJ org:Global Pact Trading Pty. Ltd.;OutKast Solutions email;internet:[EMAIL PROTECTED] title:Director of Product Development tel;work:+27 21 554 5059 tel;fax:+27 21 413 2800 tel;cell:+27 83 455 9978 url:http://www.outkastsolutions.co.za version:2.1 end:vcard
[lazarus] Any idea why this is going wrong ?
Hi, I'm trying to write a really simple SOAP client, to send SMS's with. At least, it's really simple in THEORY. My code is below, I checked it - in string the content is perfect, and it is posting. But it kept failing, so enventualy I sniffed it, it's POSTING it as garbage - it looks like ansi-text being read by a UTF reader but it could be something else. My best theory is that my document.write call is broken - I translated that one from the synapse Delphi example - any suggestions ? A.J. procedure TForm1.Button1Click(Sender: TObject); begin S := S+'?xml version=1.0 encoding=utf-8?'; S := S+'soap:Envelope xmlns:soap=http://www.w3.org/2003/05/soap-envelope;'; S := S+' xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;'; S := S+'xmlns:xsd=http://www.w3.org/2001/XMLSchema;'; S := S + 'soap:BodySendSMS xmlns=http://tempuri.org/'; S := S+ 'numbers'+Edit1.Text+'/numbers'; S := S+'message'+Memo1.Lines.Text+'/message'; S := S+'/SendSMS/soap:Body/soap:Envelope'; HTTP := THTTPSend.Create; U := AnsiToUTF8(S); HTTP.Document.StrWrite(Pchar(U)); l := TStringList.create; try if not HTTP.HTTPMethod('POST','http://10.0.88.123/hs_cell/hs_cell.asmx?op=SendSMS') then begin showMessage('ERROR'); writeln(Http.Resultcode); end else begin writeln(Http.Resultcode, ' ', Http.Resultstring); writeln; showMessage(Http.headers.text); writeln; l.loadfromstream(Http.Document); showMessage(S+LineEnding+LineEnding+l.text); end; finally HTTP.Free; l.free; end; end; -- Any sufficiently advanced technology is indistinguishable from magic - Clarke's law Any technology that is distinguishable from magic is insufficiently advanced -Gehm's corollary Any technologist that is distinguishable from a magician is insufficiently advanced - My corollary The worlds worst webcomic: http://silentcoder.co.za/scartoonz The worlds best cybercafe manager: http://outkafe.outkastsolutions.co.za begin:vcard fn:AJ Venter n:Venter;AJ org:Global Pact Trading Pty. Ltd.;OutKast Solutions email;internet:[EMAIL PROTECTED] title:Director of Product Development tel;work:+27 21 554 5059 tel;fax:+27 21 413 2800 tel;cell:+27 83 455 9978 url:http://www.outkastsolutions.co.za version:2.1 end:vcard
Re: [lazarus] Docking Message window into Source editor
Can I vote for this one ? :) For those of us still hoping for a single window IDE eventually, this would be a small but extremely important step along the way. A.J. wile64 wrote: Hi all, It is a (unofficial) patch for docking the message window into the source editor (bottom). I dont search Message Window ;) Tested on win32 and GTK2 Regards -- Laurent. My Web : http://wile64.neuf.fr/ French Forum : http://lazforum-fr.tuxfamily.org/index.php -- Any sufficiently advanced technology is indistinguishable from magic - Clarke's law Any technology that is distinguishable from magic is insufficiently advanced -Gehm's corollary Any technologist that is distinguishable from a magician is insufficiently advanced - My corollary The worlds worst webcomic: http://silentcoder.co.za/scartoonz The worlds best cybercafe manager: http://outkafe.outkastsolutions.co.za begin:vcard fn:AJ Venter n:Venter;AJ org:Global Pact Trading Pty. Ltd.;OutKast Solutions email;internet:[EMAIL PROTECTED] title:Director of Product Development tel;work:+27 21 554 5059 tel;fax:+27 21 413 2800 tel;cell:+27 83 455 9978 url:http://www.outkastsolutions.co.za version:2.1 end:vcard
Re: [lazarus] IDE cannot find unit oldlinux
I would not suggest using oldlinux just for shell. There is a replacement shell implementation in the Unix unit which works. A.J. On 9/24/07, 12 12 [EMAIL PROTECTED] wrote: I have moved 'oldlinux.pp' in directory which is visible from 'Compiler options'. Now Lazarus barks: /home/user/Library/vfp/preprocessed/oldlinux.pp(1334,11) Error: Function is already declared Public/Forward CreateShellArgV(const AnsiString):^PChar /home/user/Library/vfp/preprocessed/oldlinux.pp(1343,11) Error: Function is already declared Public/Forward Execl(const AnsiString) /home/user/Library/vfp/preprocessed/oldlinux.pp(1345,11) Error: Function is already declared Public/Forward Execle(AnsiString, PPChar) /home/user/Library/vfp/preprocessed/oldlinux.pp(1347,11) Error: Function is already declared Public/Forward Execlp(AnsiString, PPChar) /home/user/Library/vfp/preprocessed/oldlinux.pp(1349,11) Error: Function is already declared Public/Forward Shell(const AnsiString):LongInt /home/user/Library/vfp/preprocessed/oldlinux.pp(1589,11) Error: Function is already declared Public/Forward StringToPPChar(var AnsiString):^PChar /home/user/Library/vfp/preprocessed/oldlinux.pp(1613,1) Fatal: There were 6 errors compiling module, stopping Some piece of 'oldlinux.pp': function CreateShellArgV(const prog:string):ppchar; function CreateShellArgV(const prog:Ansistring):ppchar; _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives -- A.J. Venter Director of Product Development Tel.: +27 21 554 5059 Fax: +27 21 413 2800 Outkast Solutions IT www.outkastsolutions.co.za A division of Global Pact Trading Pty Ltd. www.silentcoder.co.za - Blog scartoonz.silentcoder.co.za - ScarToonz webcomic _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [Lazarus] Another icons for Lazarus
Stephen Dickason wrote: Project icon could be cheetah, but not sure how to put into 16x16. Not sure if it is used already for something else. Like this ? -- Any sufficiently advanced technology is indistinguishable from magic - Clarke's law Any technology that is distinguishable from magic is insufficiently advanced -Gehm's corollary Any technologist that is distinguishable from a magician is insufficiently advanced - My corollary The worlds worst webcoming: http://silentcoder.co.za/scartoonz The worlds best cybercafe manager: http://outkafe.outkastsolutions.co.za inline: cheatah16.pngbegin:vcard fn:AJ Venter n:Venter;AJ org:Global Pact Trading Pty. Ltd.;OutKast Solutions email;internet:[EMAIL PROTECTED] title:Director of Product Development tel;work:+27 21 554 5059 tel;fax:+27 21 413 2800 tel;cell:+27 83 455 9978 url:http://www.outkastsolutions.co.za version:2.1 end:vcard
Re: [Lazarus] Another icons for Lazarus
wile64 wrote: I think that it is not easy to draw a project and that the other applications did not find! The exe idea is good, I see ! cheetah is very difficult to 16x16 ( Venter it is a cat ? :D ) I agree that it is difficult to draw cheetah in 16x16 - but a cheetah IS a cat ;) trust me on this, I live in Africa :p -- Any sufficiently advanced technology is indistinguishable from magic - Clarke's law Any technology that is distinguishable from magic is insufficiently advanced -Gehm's corollary Any technologist that is distinguishable from a magician is insufficiently advanced - My corollary The worlds worst webcoming: http://silentcoder.co.za/scartoonz The worlds best cybercafe manager: http://outkafe.outkastsolutions.co.za begin:vcard fn:AJ Venter n:Venter;AJ org:Global Pact Trading Pty. Ltd.;OutKast Solutions email;internet:[EMAIL PROTECTED] title:Director of Product Development tel;work:+27 21 554 5059 tel;fax:+27 21 413 2800 tel;cell:+27 83 455 9978 url:http://www.outkastsolutions.co.za version:2.1 end:vcard
Re: [lazarus] Another icons for Lazarus
Does nobody others have opinion on this subject? With all the new images I missed these. It indeed looks like variations of an inbox, I don't see a relation to a project. Otoh, a project is a bunch of files which can be filed an such box. Anyway, looking at other places in Lazarus, there is the project source icon and there is pkg_project.xpm I think the red/yellow/blue figure are used on more places to indicate something of a project. My opinion is to think of what a project is - and then think of how to represent it. Basically a project is a number of related files that form parts of the same bigger concept. One way to represent it would be a file-folder, only this idea has been used before for directories (a similar concept in fact). Another would be a file-cabinet -but that is typically associated with archives so rule that out. A clipboard can hold related files together - but it will be mistaken for the copy/paste clipboard. An inbox/paper-tray does represent it, but is more commonly associated with e-mail. So it looks like all the obvious choices are already taken. In that case, let's look at it from a different angle. A project is what all the files are meant to produce, but the files are not the project. The project is an end in itself and it's purpose is to produce the executable results. So an executable icon could work - but it doesn't quite fit - the project PRODUCES an executable (or becomes one) but it ISN'T one itself. What is that something that it is. If we think abstractly enough to describe the concept of a project - then it is a series of related tasks that produce a result. Well for THAT idea we do have a commonly recognized symbol - the checkbox tree. Something like this | |__[] | |__[] | |__[] Now shrink that into a good size, scale it a bit and turn it into pixels instead of ascii and I think you got the right kind of concept conveyed (with a bit or work anyway)) :p Any thougths ? -- Any sufficiently advanced technology is indistinguishable from magic - Clarke's law Any technology that is distinguishable from magic is insufficiently advanced -Gehm's corollary Any technologist that is distinguishable from a magician is insufficiently advanced - My corollary The worlds worst webcoming: http://silentcoder.co.za/scartoonz The worlds best cybercafe manager: http://outkafe.outkastsolutions.co.za begin:vcard fn:AJ Venter n:Venter;AJ org:Global Pact Trading Pty. Ltd.;OutKast Solutions email;internet:[EMAIL PROTECTED] title:Director of Product Development tel;work:+27 21 554 5059 tel;fax:+27 21 413 2800 tel;cell:+27 83 455 9978 url:http://www.outkastsolutions.co.za version:2.1 end:vcard
Re: [lazarus] Another icons for Lazarus
However I was thinking to something of the sort of the Kdevelop project icon, but with two gears instead of one. Also Qt Designer uses the same approach. I include the two samples, for your inspiration (or further reject). These are the SAME icons used in KDE for the 'executable' or very close to it at least. Clearly they stopped thinking at the point I passed through (that a project produces an executable) - but I still think a project is what an executable is MADE from - not the executable itself. Since my icon idea was considered too complex for 16x16 I would propose that we DO use the gear - but let's take it a step further - and try to convey the concept of what an executable is made from. Now if the exe is a gear... I see two instant ideas in my head. The first is a wireframe gear - e.g. just an outline. The only question is whether it will remain recognizeable at small sizes. The next is to split the gear into parts. A pie-sliced gear if you will. Too many slices would make it look like a piechart icon though - so perhaps we should just neatly cut it into two. Voila - we have PIECES that when combined can produce and EXECUTABLE - better than that I cannot represent the idea of a project. I created a quick sample from my KDE icons - but I would suggest if we adopt the idea that we do a proper one in Lazarus look/feel. -- Any sufficiently advanced technology is indistinguishable from magic - Clarke's law Any technology that is distinguishable from magic is insufficiently advanced -Gehm's corollary Any technologist that is distinguishable from a magician is insufficiently advanced - My corollary The worlds worst webcoming: http://silentcoder.co.za/scartoonz The worlds best cybercafe manager: http://outkafe.outkastsolutions.co.za inline: gearsample.pngbegin:vcard fn:AJ Venter n:Venter;AJ org:Global Pact Trading Pty. Ltd.;OutKast Solutions email;internet:[EMAIL PROTECTED] title:Director of Product Development tel;work:+27 21 554 5059 tel;fax:+27 21 413 2800 tel;cell:+27 83 455 9978 url:http://www.outkastsolutions.co.za version:2.1 end:vcard
[lazarus] Ipro - Scrollbars
Hi all, Is there any way to disable the internal scrollbars in TurboPowerIpro ? Or at least make them only show when the content exceeds the window size ? A.J. -- Any sufficiently advanced technology is indistinguishable from magic - Clarke's law Any technology that is distinguishable from magic is insufficiently advanced -Gehm's corollary Any technologist that is distinguishable from a magician is insufficiently advanced - My corollary The worlds worst webcoming: http://silentcoder.co.za/scartoonz The worlds best cybercafe manager: http://outkafe.outkastsolutions.co.za begin:vcard fn:AJ Venter n:Venter;AJ org:Global Pact Trading Pty. Ltd.;OutKast Solutions email;internet:[EMAIL PROTECTED] title:Director of Product Development tel;work:+27 21 554 5059 tel;fax:+27 21 413 2800 tel;cell:+27 83 455 9978 url:http://www.outkastsolutions.co.za version:2.1 end:vcard
Re: [lazarus] Another icons for Lazarus
I don't suppose you can come up with a nice icon for TPopupNotifier eh ? :p A.J. On 9/12/07, wile64 [EMAIL PROTECTED] wrote: 2007/9/11, Joost van der Sluis [EMAIL PROTECTED]: Well... if you have time, do you also allow requests? The icons of the sqldb-components aren't really beautiful. And the components in the fp-web-package (lazarus/components/fp-web) are non-existent... ;) Joost I can see this with afterwards of time ;) -- Laurent. My Web : http://wile64.neuf.fr/ French Forum : http://lazforum-fr.tuxfamily.org/index.php -- A.J. Venter Director of Product Development Tel.: +27 21 554 5059 Fax: +27 21 413 2800 Outkast Solutions IT www.outkastsolutions.co.za A division of Global Pact Trading Pty Ltd. www.silentcoder.co.za - Blog scartoonz.silentcoder.co.za - ScarToonz webcomic _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Another icons for Lazarus
I was mostly kidding, Since TPopupNotifier has been included in Laz for a long time now, it would be nice if it had a decent icon - I'm just stumped for an IDEA of what it should look like... If I think of anything, I'll happilly do it myself. I A.J. On 9/12/07, wile64 [EMAIL PROTECTED] wrote: 2007/9/12, A.J. Venter [EMAIL PROTECTED]: I don't suppose you can come up with a nice icon for TPopupNotifier eh ? :p I cannot do everything, dont not have another draughtsman? -- Laurent. My Web : http://wile64.neuf.fr/ French Forum : http://lazforum-fr.tuxfamily.org/index.php -- A.J. Venter Director of Product Development Tel.: +27 21 554 5059 Fax: +27 21 413 2800 Outkast Solutions IT www.outkastsolutions.co.za A division of Global Pact Trading Pty Ltd. www.silentcoder.co.za - Blog scartoonz.silentcoder.co.za - ScarToonz webcomic _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Lazarus on one window (aka SDI)
The single worst thing about the many windows IDE is this: I am coding, I need to look something up, I'm on my laptop so there isn't another screen, I open a browser. I want to go back to my code when I'm done - I have to click 8 or 10 things in the taskbar to get all the windows to the front. Usually you can get away with just minimizing the other program - but when there are 3 or 4... It is SO bad that I have gotten in the habit of using a dedicated virtual desktop just for Lazarus. I would definitely be in favor of a single window design. A.J. On 9/11/07, Den Jean [EMAIL PROTECTED] wrote: On Tuesday 11 September 2007 07:47:03 Víctor R. Ruiz wrote: on my development environments, with little desktop space, working with many windows is not a happy experience. I also read some threads I also prefer everything docked in one window (in Kylix), even on a 24. This way nothing get partially covered and I can easily re-divide the space between Object Inspector and Editor (if still necessary on 1920x1200). when working on forms, I use kde/kwin to let the form stay on top of the editor till I am done with the form. would be nice to see this in lazarus _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives -- A.J. Venter Director of Product Development Tel.: +27 21 554 5059 Fax: +27 21 413 2800 Outkast Solutions IT www.outkastsolutions.co.za A division of Global Pact Trading Pty Ltd. www.silentcoder.co.za - Blog scartoonz.silentcoder.co.za - ScarToonz webcomic _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] TImage.Autosize
O, i undertood you wrong. The TImage should resize, not the image inside it, since that last works: http://www.dommelstein.nl/scrap/scale.png But you want the opposite. it should be fixed in r11945 This had nothing to do with the changed graphics. Seen the code I doubt if it had ever worked before. Here are the scenarios that should actually work. Imagine I have a file mypicture.png in the same directory as my app, with dimensions of 500x500. - Scenario 1: I run: Var Img:Timage. ... Img := TImage.Create; Img.Parent := Form1; //Etc. until it's visible. Img.Autosize := True; Img.Stretch := False; Img.LoadFromFile('mypicture.png'); Expected result: Img.Width becomes 500, Img.Height becomes 500, I can see the entire mypicture.png unscaled - same as if I opened it in my webbrowser. Status: This always worked before, it stopped working with the last version I have (I am updating to the latest right now) - this was what prompted my report. -- Scenario 2: I do all the same as before BUT: Img.Stretch := True; Expected result: Img.Width and Img.Height are unchanged. MyPicture.Png is SCALED to the size of Img. If I now change the dimensions of Img, the visible picture on the screen should resize. I do NOT know what autosize's value should be for this - but I've tested with both true and false. Status: This has never worked before but it is supposed to if we are to be compatible with delphi timage. I wasn't really reporting on this - though I think you originally thought I was. Is this working now ? - That should hopefully clarify what I meant. My other report (about stretchdraw) I withdraw, turns out my test image was corrupted. A.J. begin:vcard fn:AJ Venter n:Venter;AJ org:Global Pact Trading Pty. Ltd.;OutKast Solutions email;internet:[EMAIL PROTECTED] title:Director of Product Development tel;work:+27 21 554 5059 tel;fax:+27 21 413 2800 tel;cell:+27 83 455 9978 url:http://www.outkastsolutions.co.za version:2.1 end:vcard
Re: [lazarus] UTF-8 input handling
Felipe Monteiro de Carvalho wrote: On 9/5/07, Graeme Geldenhuys [EMAIL PROTECTED] wrote: Does the LCL text components (like TEdit and TMemo) handle UTF-8 input? Yes. On Windows they handle it if you recompile lcl with the unicode switch. Actually the input isn't UTF-8 on Windows, but rather either UTF-16 or Ansi, but we convert it so it's transparent for the LCL user. Quick question - how do you 'recompile the lcl with the unicode switch' ? I should almost CERTAINLY add this as a requirement in the build instructions for the OutKafe windows client. Phillip is that correct ? A.J. begin:vcard fn:AJ Venter n:Venter;AJ org:Global Pact Trading Pty. Ltd.;OutKast Solutions email;internet:[EMAIL PROTECTED] title:Director of Product Development tel;work:+27 21 554 5059 tel;fax:+27 21 413 2800 tel;cell:+27 83 455 9978 url:http://www.outkastsolutions.co.za version:2.1 end:vcard
[lazarus] Threads in packages
Here's an odd one. In the OutKafelibs package, there is a TThread descendent (among a bunch of other classes). In previous versions of OutKafe I was calling TThread.Create repeatedly whenever I had to run a plugin - suffice to say I found this hugely unclean (tthread.free doesn't have enough guarantees) so I changed it to use and then continue to REUSE just one thread. This meant I had to go put TThread.Create somewhere each OutKafe program were bound to run it before the first event could be triggered. The logical place was inside the database creation code. Chaching -worked like a charm... until now that is. Suddenly whenever I install this package (set as a runtime+designtime package) into the IDE the IDE crashes complaining of threading being initialised BEFORE cthreads. But the dbconnect method SHOULD only be called by apps using the unit - not by the IDE... why on earth would the IDE crash then ? I tried sticking cthreads in the unit and a bunch of other stuff, nothing works. What DID let me go on, was to change the package to runtime only, now the apps compile and run, and so does the IDE (with the package not installed). But this is FAR from ideal - the package SHOULD be installable. What could cause the IDE to try and create the thread on startup ? A.J. begin:vcard fn:AJ Venter n:Venter;AJ org:Global Pact Trading Pty. Ltd.;OutKast Solutions email;internet:[EMAIL PROTECTED] title:Director of Product Development tel;work:+27 21 554 5059 tel;fax:+27 21 413 2800 tel;cell:+27 83 455 9978 url:http://www.outkastsolutions.co.za version:2.1 end:vcard
Re: [lazarus] Threads in packages
Hi It means some units uses multithreading code. It does no matter if they can not logically be called, because the compiler can not know this. When you use threads, some RTL things must be initialized for that. One of those things is using the cthreads unit under unix like systems. You have two ways to fix this: I think I figured out since then what the change was that affected the IDE. In the past the instantiation of the TThread descended class was in a private variable. In order to move the creation of the thread to the much earlier executed database code, I had to make it a global variable. a) Don't compile the multithreaded units into any package that is installed in the IDE. b) Add -dUseCThreads to the usage options of the package (custom options). Then the IDE will use the cthreads unit automatically. Okay, I tried this and it DID work (under linux anyway). Question though: will adding -dUseCthreads to the package NOT break win32 compilation ? The package is definitely used multiplatform. Asuming that the compiler will just ignore this option on win32, this is the answer I needed. A.J. begin:vcard fn:AJ Venter n:Venter;AJ org:Global Pact Trading Pty. Ltd.;OutKast Solutions email;internet:[EMAIL PROTECTED] title:Director of Product Development tel;work:+27 21 554 5059 tel;fax:+27 21 413 2800 tel;cell:+27 83 455 9978 url:http://www.outkastsolutions.co.za version:2.1 end:vcard
[lazarus] TImage.Autosize
Hi all, New error, affecting at least gtk1 AND gtk2. TImage.Autosize is being ignored. When using Timage.LoadFromFile the image does not resize regardless of the size of timage.AutoSize. Likewize timage.Picture.Canvas.StretchDraw seems not to work as advertized. Images loaded which are larger than the TImage default size is therefore cropped instead of the image resising to show them in full. This is new as the code definitely worked with previous lazarus versions. A.J. begin:vcard fn:AJ Venter n:Venter;AJ org:Global Pact Trading Pty. Ltd.;OutKast Solutions email;internet:[EMAIL PROTECTED] title:Director of Product Development tel;work:+27 21 554 5059 tel;fax:+27 21 413 2800 tel;cell:+27 83 455 9978 url:http://www.outkastsolutions.co.za version:2.1 end:vcard
Re: [lazarus] TImage.Autosize
This is new as the code definitely worked with previous lazarus versions. Yes, ythat part got rewritten, probably a wrong compare. Is there an obvious fix somewhere ? A.J. begin:vcard fn:AJ Venter n:Venter;AJ org:Global Pact Trading Pty. Ltd.;OutKast Solutions email;internet:[EMAIL PROTECTED] title:Director of Product Development tel;work:+27 21 554 5059 tel;fax:+27 21 413 2800 tel;cell:+27 83 455 9978 url:http://www.outkastsolutions.co.za version:2.1 end:vcard
[lazarus] GTK2 Error: Failed to create handles
There is something wrong in the newer lazarus revisions, it's in TBitmap.inc and it causes the GTK2 IDE to die on startup with the error Failed to create handles - ditto for any GTK2 apps compiled with it. I am now reverting to R11800 in the hope of just being able to go on with my project. Here is a sample of the error messages: [FORMS.PP] ExceptionOccurred Sender=EReadError Exception=Error reading AddCustomerForm.Icon.Data: Failed to create handles Stack trace: $080A3B7F $080A33DF $0809A76B $08115B91 INITCOMPONENT, line 2706 of lresources.pp $08115A0F INITLAZRESOURCECOMPONENT, line 2725 of lresources.pp $0810ED07 INITRESOURCECOMPONENT, line 526 of lresources.pp $0807A4F2 TCUSTOMFORM__CREATE, line 1333 of ./include/customform.inc $08080CC2 TAPPLICATION__CREATEFORM, line 1607 of ./include/application.inc $0805B893 main, line 18 of hawkstoneadmin.lpr TApplication.HandleException Error reading AddCustomerForm.Icon.Data: Failed to create handles Stack trace: $080A3B7F $080A33DF $0809A76B $08115B91 INITCOMPONENT, line 2706 of lresources.pp $08115A0F INITLAZRESOURCECOMPONENT, line 2725 of lresources.pp $0810ED07 INITRESOURCECOMPONENT, line 526 of lresources.pp $0807A4F2 TCUSTOMFORM__CREATE, line 1333 of ./include/customform.inc $08080CC2 TAPPLICATION__CREATEFORM, line 1607 of ./include/application.inc $0805B893 main, line 18 of hawkstoneadmin.lpr Hope somebody can help me here. A.J. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] [ASK] How To Play FLV (Flash Video) YouTube
And before you ask, no, I do not have any pascal samples. It's a very FAQ. However, you should be able to convert basically any C sample to pascal with easy. It's just a few function calls, so the syntax is almost 100% the same. FFMpeg is certainly better, faster, more free and more well-supported than the commercial alternatives. I didn't know about it's existence, thanks :-) Nice, it would be REALLY nice if somebody who knows how to do such things (read exclude $SELF) could wrap a component around these so you could embed a player window inside an app ? A.J. -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Installing Lazarus in Slackware 12
Hiya Gandi, I have lazarus packages for OpenLab which are compatible with slackware (you can use installpkg) available from: http://www.getopenlab.com/openlab//openlab_400_optional/lazarus-0.9.17-i486-0.tgz You need to install the gdk-pixbuf package as well (grab one from slackware.com/pb if you slack12 doesn't have it) and of course gtk1.2. If you want a more recent version, check out from svn, under the tools/install directory is a script called: create_lazarus_slacktgz.sh which I contributed, it can build slackware packages from any subversion checkout. I don't know if anybody is actually building them regularly though. Ciao A.J. On 7/17/07, Gandi Wibowo [EMAIL PROTECTED] wrote: Can anyone help me to install lazarus in Slackware 12? Fpc 2.0.4 has already installed in my System, but i can not install the lazarus. Could you tell me how to do it? _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Installing Lazarus in Slackware 12
Hiya Gandi, I have lazarus packages for OpenLab which are compatible with slackware (you can use installpkg) available from: http://www.getopenlab.com/openlab//openlab_400_optional/lazarus-0.9.17-i486-0.tgz 0.9.17 is pretty old and a development version. Better use at least 0.9.22. Unfortunately since yours truly LEFT openlab nobody has apparently maintained the lazarus packages there, the old one exists, but it is old. This is also why I included instructions on the slacktgz script in SVN instead of JUST the package. I don't have an up-to-date slack machine right now, or I would offer to do an updated slack package, I just tried to help the bes I can with my current resources based on my past experience. Ciao A.J. -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Did lazarus need GNOME for install?
There is at least two ways to install gnome under slackware, dropline gnome (http://www.droplinegnome.net/) and freerock gnome (http://gsb.freerock.org/) freerock is easier to work with if you just want to install packages for parts of gnome, dropline is easier to install the whole thing. Personally I recommend freerock since it replaces very few of slackware's own packages (while dropline swaps out massive chunks and can mess up all your other dependency handling). BUT you don't need gnome at all. All you need is gtk1.2 and gdk_pixbuf, if you really cannot find a package, they are both very easy to build from source. I found those with a simple search in the package browser. But there wasn't apparently a version for slackware 12 (the slackware 11 version will work find though) http://packages.slackware.it/package.php?q=11.0/gdk-pixbuf-0.22.0-i486-1 And gtk12 (which DID have a slackware 12 version): http://packages.slackware.it/package.php?q=12.0/gtk+-1.2.10-i486-4 Ciao A.J. On 7/17/07, Mattias Gaertner [EMAIL PROTECTED] wrote:http://www.droplinegnome.net/ On Tue, 17 Jul 2007 18:50:03 +0700 Gandi Wibowo [EMAIL PROTECTED] wrote: Did lazarus need GNOME? GNOME is the desktop environment, providing all the tools a user needs for everyday work. Lazarus does not need GNOME. It can run under KDE and other window managers/desktops as well. But the gtk1 version of lazarus needs the gdk_pixbuf library, which AFAIK uses some of the base libs of the GNOME project. So depending on your distro you might need parts of GNOME. There no GNOME in Slackware... So i can't install The gdk-pixbuff it's always error, i think it's need gnome.h and there is no GNOME in Slackware How can i install the lazarus without GNOME (in Slackware specially)? I don't know Slackware, but since other users have used lazarus there, Slackware must support GNOME somehow. Of course it is also possible to compile lazarus against the newer gtk2 libraries, where pixbuf is integrated without GNOME. But the gtk2 interface of lazarus is less complete than the older gtk1 interface, so it depends on your needs, if this is sufficient. Can you install the gtk2 libraries under Slackware? Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Gettext, what am I doing wrong ?
Hi all, I am trying to make OutKafe gettext translateable, using whatever code I can find for samples this is what my code now looks like: --- uses Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, ExtCtrls,Util, StdCtrls, Buttons , gtkproc, TrayIcon, popupnotifier, Menus,liboutkafe,popupunit, fileUtil,baseunix,unix, IpHtml, Ipfilebroker,gettext; resourcestring rsLoginDetails = 'Enter your login details to continue'; rsLoginName = 'Login Name'; rsPassword = 'Password'; rsLogin = 'Login'; snip procedure OklinMainForm.Create; snip //LangPath is a const, it is set to /usr/share/outkafe/lang TranslateUnitResourceStrings('oklinmainunit', LANGPATH+PathDelim+'oklin.%s.po'); Label1.Caption := Utf8ToAnsi(rsLoginDetails); Label2.Caption := Utf8ToAnsi(rsLoginName); Label3.Caption := Utf8ToAnsi(rsPassword); LoginBtn.Caption := Utf8ToAnsi(rsLogin) --- So I compile it, which generates an oklinmainunit.rst file, I run rstconv -i oklinmainunit.rst -o oklin.po cp oklin.po oklin.af.po I edit oklin.af.po and copy it to /usr/share/outkafe/lang I ALSO run msgfmt oklin.af.po -o oklin.af.mo And put that in there as WELL, Then I run: LANG=af ./oklin But the program remains obstinately in English (no output in the console gives me any indication of why). Can anybody give me an idea what I am doing wrong ? Why does the TranslateUnitResourceStrings function appear to have FOUR parameters in some calls (but not in the gettext unit) - is that alternative a better choice ? Where do I get it? TIA A.J. -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Gettext, what am I doing wrong ?
And there are two TranslateUnitResourceStrings functions. The one with 4 parameters expects the file mask, the other a specific .po file. If the file does not exist it returns false. In which unit is this second one declared ? ? And which one should I use ? Try this: GetLanguageIDs(Lang,FallbackLang); TranslateUnitResourceStrings('oklinmainunit', LANGPATH+PathDelim+'oklin.%s.po',Lang,FallbackLang); I'll try this A.J. -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Gettext, what am I doing wrong ?
Thanks everybody, By combining this with one other hunch, I have it working, I used Mattias' example code, at first it still failed, until I changed my call as follows: LC_MESSAGES=af ./oklin I don't know why, but LANG does not seem to override LC_MESSAGES Either way, it's working, thanks everybody. A.J. On 7/12/07, Mattias Gaertner [EMAIL PROTECTED] wrote: On Thu, 12 Jul 2007 22:35:40 +0200 A.J. Venter [EMAIL PROTECTED] wrote: And there are two TranslateUnitResourceStrings functions. The one with 4 parameters expects the file mask, the other a specific .po file. If the file does not exist it returns false. In which unit is this second one declared ? Both are defined in lcl/translations.pas. ? And which one should I use ? See the example: The function with 4 parameters. Try this: GetLanguageIDs(Lang,FallbackLang); TranslateUnitResourceStrings('oklinmainunit', LANGPATH+PathDelim+'oklin.%s.po',Lang,FallbackLang); I'll try this The GetLanguageIDs is defined in gettext. Mattias _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Gettext, what am I doing wrong ?
Hi again Well it worked partially, it got the STATIC messages translated, but not the dynamic ones. First of those are the error messages. I use a little wrapper procedure to show them (they are captions on a tpanel) Procedure ShowError(Error:String); Begin OKLinMain.ErrorLabel.Caption := Error; OKLinMain.ErrorLabel.Visible := True; Writeln(Error); end; Then wherever in the code is needed, I call showerror. So I defined resource strings for my error messages, and replaced the first few. Sure enough I could translate them, but the resulting program doesn´t show their translations. The static parts are all translating just fine, but these ones are not translating at all. showError(LoggedInUser+' '+Utf8ToAnsi(RsHasBeenLoggedout)) Moreover this is clearly not an ideal setup for them since the grammer would require the username to be elsewhere in the sentence sometimes (how do I handle that), and there is the even more complex part where I need to set a number of captions for a different form out of this unit later on: TrayIcon1.Hint := IntToStr(Units)+' Units remaining'; Popup1.Caption := IntToStr(Units)+' Units remaining'; Popup1.Panel1.Color := RGBToColor(227,108,42); Writeln(Units); Popup1.TextY.Caption := 'Welcome user '+LoggedInUser+LineEnding; Popup1.TextY.Caption := Popup1.TextY.Caption+'You have '+IntToStr(Units)+' time units left'+LineEnding; All of that should obviously ALSO be translated. How do I do that part please ? A.J. -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] A counting proxy in lazarus ?
Hi all, I have an interesting challenge before me. A user has requested the ability to keep track of http traffic used by OutKafe users. These should count against the user's available usage units the same way time does now (so a big downloader will run out of access quicker basically) After some thought and discussion, I came to the conclusion that in their environment the approach should be this (keep in mind we're only concerned about http): Put an http proxy inside the outkafe counter window, send the browser through it. This proxy need not cache ANYTHING. It ONLY needs to relay the http traffic back and forth - and count the bytes coming in (Each instance can run on it's own port - no problems there) So my question is - can I do this with the INet components ? If I hook up INet's http server and http client components into my app - can I then let the browser connect to the httpserver component as a proxy client, and have the httpclient component relay the same connection ? How hard would this be ? Does the INet components have the tools I would need to count the bytes ? If none of this is an option - is there another (easy) way I can do this ? Perhaps a plugin for squid that can report on bandwith used by each user ? Or perhaps just a proxy interface that can report this to stdout ? Or would you guys suggest some entirely different approach ? (I am open to possibility here) Of course, a way to just track 'traffic per user' and respond each time one meg is transferred could be ideal - again I'm open to suggestion. TIA A.J. -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Some OpenGL questions
This is a known problem, related to FPC versions, the workaround I posted on the wiki page for ttrayicon will work for this as well. A.J. On 7/3/07, Paul Michell [EMAIL PROTECTED] wrote: Hello All, I have used LazOpenGLContext in GTK1 with no problems. I would now like to move to GTK2 as this seems much more stable these days. However, when I rebuild Lazarus for GTK2 widgetset, the compilation fails with the message: /home/paul/Applications/Lazarus/components/opengl/glgtkglxcontext.pas(1,1) Fatal: Can't find unit gdk2x Is this a known problem, or am I doing something wrong? If it is a known problem I would like to contribute to solving it, although I know very little about GTK development and I would need pointing in the right direction! I have also tried to install GLScene for Lazarus. I followed the installation instructions for version 1.0.0.1 given in the WIKI at: http://wiki.lazarus.freepascal.org/index.php/GLScene I used the SVN option with today's Lazarus from SVN using FPC 2.0.4. The rebuild halts with the message: The package glscenelazarus 1.0.0.1 failed to compile. Remove it from the installation list? The compiler error messages are: /home/paul/Applications/Lazarus/components/glscene/Source/glmisc.pas(409,91) Error: This symbol isn't allowed as storage symbol /home/paul/Applications/Lazarus/components/glscene/Source/glmisc.pas(413,91) Error: This symbol isn't allowed as storage symbol /home/paul/Applications/Lazarus/components/glscene/Source/glmisc.pas(414,91) Error: This symbol isn't allowed as storage symbol /home/paul/Applications/Lazarus/components/glscene/Source/glmisc.pas(415,91) Error: This symbol isn't allowed as storage symbol /home/paul/Applications/Lazarus/components/glscene/Source/glmisc.pas(443,20) Error: There is no method in an ancestor class to be overridden: TGLNodes.EndUpdate /home/paul/Applications/Lazarus/components/glscene/Source/glmisc.pas(519,1) Fatal: There were 5 errors compiling module, stopping Is there a work-around for this not in the WIKI, or have I made a mistake setting it up? Thanks for any pointers you can give, Kind regards, Paul Michell _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] TProcess or Shell ?
Hi all, I quote a discussion between myself and Philip while we were working OKWIN - which I would like the list to comment on please. Just to clarify utils.execute is two functions which wrap around tprocess, the first uses it with waitOnExit and returns a TStringList with OutPut, the second does not use waitOnExit, it just launches the subprocess (making it functionally equivalent to shell, but with tprocess as the enabling mechanism) The unix unit Shell function can be used. I've seen so many bug reports and questions related to TProcess that I'm not confident it works correctly, whereas I've used Shell on OS X and Linux. Well I know that as of FPC 2.1.4 the compiler actually generates a warning if you use the shell function that it is deprecated, I think a lot of the issues with tprocess relates to using it wrong, on the other lazarus uses it for both debugging and launching the compiler - as far as I know it's the only way to (cleanly) catch the console output of a subprocess. On the other hand, I have had reasons to suspect some bugs in it (frequent badWindow crashes when launching graphical apps with it), so perhaps it's use should be limited to the SECOND overloaded utils.execute - which grabs output, and for straight launches we should use shell and shellExecute as appropriate ? I think I will post this question to the list and get the general feel from those who know the internals well. What is the consensus please ? A.J. -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] OutKafe 5.1.0 Released !
I used the unit I could find at the time - I have never seen postgres3 before. If it won't lock me (too hard) into a certain postgres version (my original reason for not using mysql is the issues to get an app to support more than one version of the server), and at least most of my current code won't need to change, I would myself prefer something that uses external over something that uses linklib. At least it sounds like we're moving in the right direction (I also googled... wonder what you thought of to look for differently). Good to know the mac postgres seems to still be active. A.J. On 6/3/07, Hess, Philip J [EMAIL PROTECTED] wrote: Hi A.J., Googling around it appears as though I need libpq.a to link a client app against and then libpq.dll is only used at runtime. I'll download the full postgres installer this week and see if the liqpq.a file is included. Any reason why you're using postgres and not postgres3? Postgres3.pp uses external instead of linklib and doesn't require libc. I've also found a regular OS X package (.pkg) for postgres. Thanks. -Phil -Original Message- From: A.J. Venter [mailto:[EMAIL PROTECTED] Sent: Sun 6/3/2007 1:44 PM To: lazarus@miraclec.com Subject: Re: [lazarus] OutKafe 5.1.0 Released ! Hi all, Can anybody help us here ? I actually have it linking on one machine, and not on another but for the life of me I cannot figure out the difference between the two machines. Can we document this somewhere ? When developing programs using third-party linklibs through lazarus/fpc units - where do you actually PUT the dll's ? I am also trying to determine the minimum number of libfiles that need to be shipped WITH the program - the libpq.dll in the svn tree came from pgadminIII - as an experiment, but I am affraid that perhaps you need the full set of libs that are included in postgresql - or at least a few more of them... but which ones, and where to put them in order to get lazarus to build with the package installed, and the app to link on windows ? /me really hopes for some good advice here. A.J. Hi A.J., I tried compiling the OutKafe win32 client: Import library not found for pq Import library not found for c Same with trying to install outkafelibs. I see in FPC's postgres.pp that it includes: {$linklib pq} {$linklib c} This probably accounts for it. I see that installer\outkafe includes libpq.dll but pointing to it with -Fl doesn't help any. And I don't have any file named libc.dll. -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] OutKafe 5.1.0 Released !
Fair enough - just didn't want to come across as a spammer :) A.J. On 6/3/07, Pieter Valentijn [EMAIL PROTECTED] wrote: I still enjoy the conversation for me theres no need to take it off list :-) Met vriendelijke groet, Pieter Valentijn Delphidreams http://www.delphidreams.nl -Oorspronkelijk bericht- Van: A.J. Venter [mailto:[EMAIL PROTECTED] Verzonden: Sunday, June 03, 2007 8:24 AM Aan: lazarus@miraclec.com Onderwerp: Re: [lazarus] OutKafe 5.1.0 Released ! Hi Philip, It should be very little - as far as I can see - it should in fact be working - it just isn't yet (I'll bet it's a small problem though), and then packaged so it can be installed with relative ease. To give more idea -there is some major bug that's making it exit without an error message on launch - dunno what that bug is - that needs to be fixed. The windows client should be able to take connection details from a config file, connect to a postgresql server with an outkafe database, and then log in etc. Virtually all this code is written, it simply needs to be properly ported, packaged and shipped - by somebody with the experience to do so (I work as exclusively on Linux as you do on windows :p ) Of course the packaged version should also include whatever dll's are needed for a windows app to be a postgresql client. Are you up for giving it a shot ? You don't REALLY need a Linux server, you could just set up a postgresql server on windows, load the OutKafe table-scheme and manually generate one user to test with. A.J. PS. If you're really interested, I suggest we take it offlist at this point as it's becoming less and less lazarus related :) On 6/3/07, Hess, Philip J [EMAIL PROTECTED] wrote: A.J., Still sounds interesting. Could you write a few sentences about what needs to be done to finish the Windows client? What's necessary for development? I work exclusively in Windows and OS X, but don't use Linux for anything and don't have access currently to a Linux machine. Thanks. -Phil -Original Message- From: A.J. Venter [mailto:[EMAIL PROTECTED] Sent: Sat 6/2/2007 7:40 PM To: lazarus@miraclec.com Subject: Re: [lazarus] OutKafe 5.1.0 Released ! On 6/3/07, Hess, Philip J [EMAIL PROTECTED] wrote: That sound interesting. Maybe you could include that description on your Web page. Heh, fair enough - though I thought I basically had :p Where does OutKafe run? Does the cafe have a network server or something that the cafe's computers are hooked up to? OutKafe comprises basically three parts (this I KNOW is on the website). The postgresql database server does all the network serving, so I don't code any of that, I just interact with it. OutKafe has: 1) A daemon which counts down time on logged in accounts (it's done centrally for security reasons) 2) An administration tool which allows the icafe operator to sell time, create user accounts, reset passwords, define offers etc. 3) Client programs which let a user log in, counts him down and logs him out again. Currently only the Linux client is in a working state. The win32 client is very close - but I need somebody with genuine windows coding experience to help me finish it. There is also a WIFI client very similiar to what you describe below, but that is not very complex and at this stage barely started. I guess I'm not familiar with Internet cafes like this. Usually here the cafe has wireless and you get a login code for your laptop when you buy a coffee. That is common in some countries, here in the developing world the kind with computers hooked up that you buy time on is still very common, for many people such outlets ARE their offices. Having a GPL'd tool to manage them is an important (I believe) way to ensure software freedom in the developing world. OutKafe is the only such tool out there (OpenKIOSK is only partially free software - I'm not aware of any other free projects that are still actively developed though there are quite a few proprietory ones like smartlaunch). Of course the whole thing is also done in Lazarus and is one of the oldest continuing lazarus developments (the original app was started in November 2002, the Lazarus website carried a story on the 3.0 release in May 2005). Ciao A.J. -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives
Re: [lazarus] OutKafe 5.1.0 Released !
Hi Philip, What version of Postgres are you using? I see that there are several binary downloads available from the Postgres site. I've been targetting fairly current version throughout - right now I am running 8.1.5, but any 8.x version should be compatible. Any interest in a Mac client? I note that Postgres doesn't have binary download for Mac. Fink does, but it looks out of date and nothing is listed for the current version of OS X. I'm usually a little reluctant to get involved with software that doesn't support all 3 major platforms. For many Mac users putting something on fink is kind of like putting up a sign that says We don't really expect anybody to use this. There has never yet been any requests for a mac client at present, not because of anything other than sheer cost. To run a macbased cybercafe would cost a HUGE amount more in initial setup costs than a comporable intel based platform. Of course this doesn't mean there ISN'T demand - just that nobody has asked me :) If you're up to try and port it, please feel free, but I have absolutely NO clue how to lock the display on mac for myself :) As for postgres support, this is LESS critical, if the client libraries can be obtained. A.J. -Original Message- From: A.J. Venter [mailto:[EMAIL PROTECTED] Sent: Sun 6/3/2007 1:23 AM To: lazarus@miraclec.com Subject: Re: [lazarus] OutKafe 5.1.0 Released ! Hi Philip, It should be very little - as far as I can see - it should in fact be working - it just isn't yet (I'll bet it's a small problem though), and then packaged so it can be installed with relative ease. To give more idea -there is some major bug that's making it exit without an error message on launch - dunno what that bug is - that needs to be fixed. The windows client should be able to take connection details from a config file, connect to a postgresql server with an outkafe database, and then log in etc. Virtually all this code is written, it simply needs to be properly ported, packaged and shipped - by somebody with the experience to do so (I work as exclusively on Linux as you do on windows :p ) Of course the packaged version should also include whatever dll's are needed for a windows app to be a postgresql client. Are you up for giving it a shot ? You don't REALLY need a Linux server, you could just set up a postgresql server on windows, load the OutKafe table-scheme and manually generate one user to test with. A.J. PS. If you're really interested, I suggest we take it offlist at this point as it's becoming less and less lazarus related :) On 6/3/07, Hess, Philip J [EMAIL PROTECTED] wrote: A.J., Still sounds interesting. Could you write a few sentences about what needs to be done to finish the Windows client? What's necessary for development? I work exclusively in Windows and OS X, but don't use Linux for anything and don't have access currently to a Linux machine. Thanks. -Phil -Original Message- From: A.J. Venter [mailto:[EMAIL PROTECTED] Sent: Sat 6/2/2007 7:40 PM To: lazarus@miraclec.com Subject: Re: [lazarus] OutKafe 5.1.0 Released ! On 6/3/07, Hess, Philip J [EMAIL PROTECTED] wrote: That sound interesting. Maybe you could include that description on your Web page. Heh, fair enough - though I thought I basically had :p Where does OutKafe run? Does the cafe have a network server or something that the cafe's computers are hooked up to? OutKafe comprises basically three parts (this I KNOW is on the website). The postgresql database server does all the network serving, so I don't code any of that, I just interact with it. OutKafe has: 1) A daemon which counts down time on logged in accounts (it's done centrally for security reasons) 2) An administration tool which allows the icafe operator to sell time, create user accounts, reset passwords, define offers etc. 3) Client programs which let a user log in, counts him down and logs him out again. Currently only the Linux client is in a working state. The win32 client is very close - but I need somebody with genuine windows coding experience to help me finish it. There is also a WIFI client very similiar to what you describe below, but that is not very complex and at this stage barely started. I guess I'm not familiar with Internet cafes like this. Usually here the cafe has wireless and you get a login code for your laptop when you buy a coffee. That is common in some countries, here in the developing world the kind with computers hooked up that you buy time on is still very common, for many people such outlets ARE their offices. Having a GPL'd tool to manage them is an important (I believe) way to ensure software freedom in the developing world. OutKafe is the only such tool out there (OpenKIOSK is only partially free software - I'm not aware of any other free projects that are still actively developed though there are quite a few proprietory ones like smartlaunch). Of course the whole thing
Re: [lazarus] OutKafe 5.1.0 Released !
Hi all, Can anybody help us here ? I actually have it linking on one machine, and not on another but for the life of me I cannot figure out the difference between the two machines. Can we document this somewhere ? When developing programs using third-party linklibs through lazarus/fpc units - where do you actually PUT the dll's ? I am also trying to determine the minimum number of libfiles that need to be shipped WITH the program - the libpq.dll in the svn tree came from pgadminIII - as an experiment, but I am affraid that perhaps you need the full set of libs that are included in postgresql - or at least a few more of them... but which ones, and where to put them in order to get lazarus to build with the package installed, and the app to link on windows ? /me really hopes for some good advice here. A.J. Hi A.J., I tried compiling the OutKafe win32 client: Import library not found for pq Import library not found for c Same with trying to install outkafelibs. I see in FPC's postgres.pp that it includes: {$linklib pq} {$linklib c} This probably accounts for it. I see that installer\outkafe includes libpq.dll but pointing to it with -Fl doesn't help any. And I don't have any file named libc.dll. -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] html output
I'd say the only thing that comes CLOSE to what you want is java applets (and even then it's only close - it's not quite a cigar). A.J. On 6/1/07, Michael Van Canneyt [EMAIL PROTECTED] wrote: On Fri, 1 Jun 2007, Andreas Berger wrote: Hi all, Is there a way to convert a form into html or php? I have a client that wants to use an existing program over the net, but not install the program on his machine. Instead he wants to use the browser. Do I need to write a php client or can I convert my existing forms to html/php and talk with the existing lazarus app? The day you create a program which converts forms to HTML/PHP, you're rich :-) No such thing exists to my knowledge. Not for Delphi, not for any other language I know. If you want to use the web browser, you must program for it. Michael. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: Cannot compile GTK2 lcl anymore
Well with this info I went looking for the duplicate source file in the lazarus tree, moved it away and indeed got a successful build. Can we post a work-around on the wiki ? A.J. On 6/2/07, Felipe Monteiro de Carvalho [EMAIL PROTECTED] wrote: On 6/2/07, A.J. Venter [EMAIL PROTECTED] wrote: The on a hunch, I reinstalled the trayicon package - Lazarus built halfway, and failed in the same place... don't ask me why but trayiconlaz causes a problem on some 2.1.4 systems because it seems to contain a library duplication... I know why. TrayIcon uses the unit gdk2x which didn't exist on fpc 2.0.4, and because of that this unit was added to the lazarus sources. Later I asked that this unit be included on Free Pascal, so we can remove it from lazarus when FPC 2.2 is released So basically we can't solve this until 2.2 is released. -- Felipe Monteiro de Carvalho _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Any idea what can cause this ?
Hi all, I am having a very strange problem. I have a project, it opens fine, I can make any changes I want, I try to save it complains Cannot stream outkafemain:TOutKafeMain Access violation This is a form I have been working on a for along time with no previous problems. In the console, Lazarus shows the messages below. Any idea what's wrong ? TMainIDE.DoSaveAll Stack trace: $080CEE69 $080CED61 $080CE9C0 $080C351B $08070B74 TCUSTOMFORM__GETCHILDREN, line 756 of ./include/customform.inc $080CEB06 $080C351B $080CEB91 $08098E6F TMAINIDE__DOSAVEEDITORFILE, line 6288 of main.pp $0809C679 TMAINIDE__DOSAVEPROJECT, line 7317 of main.pp $0809FED5 TMAINIDE__DOSAVEALL, line 8379 of main.pp $0808B7B9 TMAINIDE__MNUSAVEALLCLICKED, line 2295 of main.pp $08152219 TCONTROL__CLICK, line 1992 of ./include/control.inc $08170191 TCUSTOMSPEEDBUTTON__CLICK, line 107 of ./include/speedbutton.inc $081718A9 TCUSTOMSPEEDBUTTON__WMLBUTTONUP, line 766 of ./include/speedbutton.inc $08060159 $08150628 TCONTROL__PERFORM, line 1000 of ./include/control.inc TMainIDE.SaveFileResources Error cleaning up: Access violation -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] OutKafe 5.1.0 Released !
Hi All, I'm happy to announce that OutKafe 5.1.0 is now available for download from http://outkafe.outkastsolutions.co.za. The new version is primarily a bugfix release containing fixes for many critical bugs and a few multidistro compatibility improvements, here is the changelog: 2007-06-02 Ported application to GTK2 Fixed multiple crash bugs in counter Fixed layout and accounting bugs in admin system Fixed counter-window button layout bug Fixes for several LTSP related bugs. Better handling of remote admin functionality Fixed a bug with number entry in sell-time dialog. 2007-05-21 Added pid-storage support to outkafed Enhanced boot scripts to use pid-stored value native installer support for chkconfig or rc-update when available I also made significant progress on the promised win32 client - but I simply couldn't get it to quite work. At this stage though, it's far enough complete that I am putting out a call for a volunteer who can help me finish it off. Anybody with experience of lazarus/delphi on Win32 who is up for helping me maintain the win32 client please mail me - I would welcome all assistance with this part, experience with postgresql will be useful but not critical (everything is pretty abstracted). Ciao A.J. -- Semper in excretum set alta variant - My father A.J. Venter - http://www.silentcoder.co.za -- Semper in excretum set alta variant - My father A.J. Venter - http://www.silentcoder.co.za -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] OutKafe 5.1.0 Released !
Well basically it's an admin suite for internet cafe's, customers get user-accounts and buy time, outkafe lets them log on, and logs them off again when their time is up - there are other features but that's the heart of it all. AJ. On 6/2/07, Hess, Philip J [EMAIL PROTECTED] wrote: What does OutKafe do? I looked at your Web site and honestly I'm still not sure what it is. Thanks. -Phil -Original Message- From: A.J. Venter [mailto:[EMAIL PROTECTED] Sent: Sat 6/2/2007 3:07 PM To: lazarus@miraclec.com Subject: [lazarus] OutKafe 5.1.0 Released ! Hi All, I'm happy to announce that OutKafe 5.1.0 is now available for download from http://outkafe.outkastsolutions.co.za. The new version is primarily a bugfix release containing fixes for many critical bugs and a few multidistro compatibility improvements, here is the changelog: 2007-06-02 Ported application to GTK2 Fixed multiple crash bugs in counter Fixed layout and accounting bugs in admin system Fixed counter-window button layout bug Fixes for several LTSP related bugs. Better handling of remote admin functionality Fixed a bug with number entry in sell-time dialog. 2007-05-21 Added pid-storage support to outkafed Enhanced boot scripts to use pid-stored value native installer support for chkconfig or rc-update when available I also made significant progress on the promised win32 client - but I simply couldn't get it to quite work. At this stage though, it's far enough complete that I am putting out a call for a volunteer who can help me finish it off. Anybody with experience of lazarus/delphi on Win32 who is up for helping me maintain the win32 client please mail me - I would welcome all assistance with this part, experience with postgresql will be useful but not critical (everything is pretty abstracted). Ciao A.J. -- Semper in excretum set alta variant - My father A.J. Venter - http://www.silentcoder.co.za -- Semper in excretum set alta variant - My father A.J. Venter - http://www.silentcoder.co.za -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] OutKafe 5.1.0 Released !
On 6/3/07, Hess, Philip J [EMAIL PROTECTED] wrote: That sound interesting. Maybe you could include that description on your Web page. Heh, fair enough - though I thought I basically had :p Where does OutKafe run? Does the cafe have a network server or something that the cafe's computers are hooked up to? OutKafe comprises basically three parts (this I KNOW is on the website). The postgresql database server does all the network serving, so I don't code any of that, I just interact with it. OutKafe has: 1) A daemon which counts down time on logged in accounts (it's done centrally for security reasons) 2) An administration tool which allows the icafe operator to sell time, create user accounts, reset passwords, define offers etc. 3) Client programs which let a user log in, counts him down and logs him out again. Currently only the Linux client is in a working state. The win32 client is very close - but I need somebody with genuine windows coding experience to help me finish it. There is also a WIFI client very similiar to what you describe below, but that is not very complex and at this stage barely started. I guess I'm not familiar with Internet cafes like this. Usually here the cafe has wireless and you get a login code for your laptop when you buy a coffee. That is common in some countries, here in the developing world the kind with computers hooked up that you buy time on is still very common, for many people such outlets ARE their offices. Having a GPL'd tool to manage them is an important (I believe) way to ensure software freedom in the developing world. OutKafe is the only such tool out there (OpenKIOSK is only partially free software - I'm not aware of any other free projects that are still actively developed though there are quite a few proprietory ones like smartlaunch). Of course the whole thing is also done in Lazarus and is one of the oldest continuing lazarus developments (the original app was started in November 2002, the Lazarus website carried a story on the 3.0 release in May 2005). Ciao A.J. -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Resizing an image
Hi Michael, Here is how I do it [I'm sure you can customise it to your needs, factor can also be something like 0.5 (to scale to halfsize)] :) A.J. Procedure Scale(P1 : TPicture;Var P2:TPicture;Factor : Real); Var ARect : TRect; X,Y : Integer; Begin X := Round(P1.Width * Factor); Y := Round(P1.Height * Factor); P2.Clear; P2.BitMap.Width := X; P2.BitMap.Height := Y; Arect := Rect(0,0,X,Y); P2.BitMap.Canvas.StretchDraw(ARect,P1.BitMap); end; On 6/1/07, Charl van Jaarsveldt [EMAIL PROTECTED] wrote: Hi Michael, I am still confused. :-( I cannot figure out how to get the FPImage drawn. I thought perhaps the TImage.canvas.draw() function would do it - the code completion shows a draw(int, int, FPCustomImage) method, but when I compile it the compiler says it it expects a TGraphic. Sure enough, the TCanvas has one that expects TGraphic, and FPCanvas has one with FPCustomImage, but it is not marked as overloaded, so I think the compiler assumes it is not available. I tried to find a way to get a TGraphic object from a FPCustomImage, but no success. Thanks again for the help. Charl On 5/31/07, Charl van Jaarsveldt [EMAIL PROTECTED] wrote: Ah, that would probably explain why I can't find it. :-) Yeah, I want to keep a cache of images in memory while keeping open the possibility of actually saving the cache. Thanks for the help! Charl On 5/31/07, Michael Van Canneyt [EMAIL PROTECTED] wrote: On Thu, 31 May 2007, Charl van Jaarsveldt wrote: Thanks for the pointers. I can't find the extinterpolation unit though. in the FPC source tree: packages/fcl-image/src/extinterpolation.pp (it may not be present if you're working with the the 2.0.4 release) I think I am getting an idea of how to do what I want. The only thing that eludes me is how to get the FPImage into the TImage control? The class hierarchy seems rather confusing there. :-( If you just want to draw it, simply draw on the TImage canvas, that should work. But TImage itself has resizing capabilities, the imgview demo shows how to do this. The disadvantage is that you can't save the resized image, as far as I know. Michael. Thanks Charl PS Please excuse my ignorance, this is the first time I am working with images! On 5/31/07, Michael Van Canneyt [EMAIL PROTECTED] wrote: On Thu, 31 May 2007, Charl van Jaarsveldt wrote: Hi, What is the best way to resize an image? I am thinking of something Java's Image class has that will return a scaled image, and you can decide whether it should be a good quality or a fast one. I don't necessarily want to write it to a file, just in memory. (I want to cache images in the memory and so would like to have them much smaller than they are.) There are several resizing alogirthms present in FPC. see the extinterpolation unit. how it happens is: create a canvas, and draw the image on the canvas with the correct interpolation. If you want to create a new image in memory, create an TFPImageCanvas with the desired size, and draw the original canvas with the correct interpolation routine. Michael. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives -- I love deadlines. I especially love the whooshing sound they make as they fly by. - Douglas Adams _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives -- I love deadlines. I especially love the whooshing sound they make as they fly by. - Douglas Adams -- I love deadlines. I especially love the whooshing sound they make as they fly by. - Douglas Adams -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Reducing Flickeron a TImage component
The disabled TBitBtn flickers, because the grayed image is created during paint. TSpeedButton does not gray the image, but paints delayed (gtk1 intf). So it might flicker less for small buttons. Aaaah, okay, that explains it - but also means it won't work for me. The 'grayed' effect is fairly fundamental to the usability of the app. Also - these are not small buttons :) the glyphs are about 128x128 each. A.J. -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] GTK2 - Bug with SpinEdit on Modal Dialog
Hi all, Not sure if this affects ALL spinedits or just on modal dialogs, but under GTK2 with the spinedit on a modal form, spinedit.value ALWAYS returns '1' regardless of the actual value - recompile the same app with gtk1 and the correct value is returned. A.J. -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Reducing Flickeron a TImage component
It seems, gtk_pixmap is creating the disabled image on-the-fly on first paint. So, the flickering is built-in. Because you change the image often, you see it often. Conclusion: gtk1+TBitBtn+disabled = flicker So the short version is - that GTK1 couldn't do what I needed (a dynamically updated but often disabled set of buttons with pictures on them) without creating a new component. It turned out to be far less work to just port this part of the program to GTK2, the rest remains GTK1 for now (there are three apps that make up the suite here) simply because fixing all the layouts etc. for GTK2 would take a LONG time (and worst of all GTK2 is still horrible with Z-order handling) but this part works just fine under GTK2 - and as per your predictions, the GTK2 version is completely flicker free. For the next OutKafe release (which I will start on after I return from this project on Friday) I will port it to GTK2 in it's entirety (it can be done now that SetWindowFulScreen works for GTK2) however. A.J. -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Reducing Flickeron a TImage component
gtk1+TBitBtn+disabled = flicker So the short version is - that GTK1 couldn't do what I needed (a dynamically updated but often disabled set of buttons with pictures on them) without creating a new component. Maybe you can try TSpeedButton instead of TBitBtn. That would only work if I painted the Caption myself would it not ? In which case... it gets even MORE custom painting... not sure it's worth it. For the next OutKafe release (which I will start on after I return from this project on Friday) I will port it to GTK2 in it's entirety (it can be done now that SetWindowFulScreen works for GTK2) however. A.J. The gtk2 intf is currently under heavy development. This can be good or bad for your project. For OutKafe it's probably a good thing, for CAN it's less good as stability is more important and this is just phase1 of a large multiphase project that will take many more months if not years to finish. That is the major reason I ONLY migrated the admin console despite the fact that the client could work too, it reduces the impact of unexpected changes in the gtk2 interface. Appart from the dynamic bitbuttons, it's really a pretty simple interface so it works fine. Ciao A.J. -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Reducing Flickeron a TImage component
Maybe you can try TSpeedButton instead of TBitBtn. That would only work if I painted the Caption myself would it not ? TSpeedButton has a Caption. Default is ''. In which case... it gets even MORE custom painting... not sure it's worth it. Did you try? Heh, point made :) Question then: so what IS the difference between TBitBtn and TSpeedButton ? In general, but also specifially before it's worth trying, it's worth knowing if their disabled paint code are in fact different. A.J. -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] TOpendialog.InitialDir
Hey Alain, let me try to help/ On 5/30/07, Alain Michaud [EMAIL PROTECTED] wrote: Hi, thank you all for the answers. I have many hints now: enough to keep me busy for many hours: --- My fstab does not say anything about .../floppy... That does not seem normal? It is in fact normal with many modern distro's (I don't know what you are running), there is no requirement even on older ones, but NOT having it there would mean there is no way to make the device user mountable (by default only root could run mount $DEVICE $MOUNTPOINT) --- My code does not have to be portable, but the users are Microsoft oriented and I find it very difficult to sell my Linux/FPC/Lazarus code. For me, opening the floppy before I run the application is easy, but for my users, it seems like an impossible task... Their next step would be to press the reset button ! I hear you, I often used to face the same issues, on most modern distros the floppy would open itself when inserted, I'm guessing this is NOT one of those. Assuming you can mount it with a simple command, I think the easiest is to just call the command from your app before running the dialog, another way would be to use the kernel automouter (there's a howto) which will mount the device whenever the mountpoint is accessed, and unmount it after X seconds inactivity. --- One colleague told me about mtools utility that will access the floppy without going through the file system. I do not know if there is a library or some programing interface? Mtools does exist, it is specific to dos floppies, it accesses them in a different way though. It can do things like copy files etc. Konqueror has a kpart which uses it so either it DOES have an API of some sort or you can read disks and manage their content pretty completely with the commandline tools it includes - if you wish to try this, I would suggest reading up on the mtools howto. --- Now I year all the laughs because I still use floppy disks: We still have an old network analyser (model 8510C) from Hewlet Packard: It is very old (1990), but very expensive to replace. It has a 720 kB flopy drive built in it. Any upgrade will be difficult because of compatibilty issue. I already feel very lucky that it will write on DOS formatted floppys. That explains it - no worries. If you let me know which distro you're using, I could possibly give more specific advice. A.J. Thank you all any way Alain On Wed, 2007-05-30 at 08:58 +0200, A.J. Venter wrote: As far as I know, the only way is to fire up a tprocess and launch the actual mount command. Of course if you want your program to be truly portable it should be configurable where it opens (many distro's mount removeable stuff under /media these days - and many of them don't use traditional mounting anymore [think hal+dbus+solid etc.]) The norm in fact is to just open the mount point and leave it to the user/distro to make sure it's mounted. I would make these things options in your program try to mount floppy before opening and floppy mount point A.J. PS. You still use floppies ? On 5/30/07, Alain Michaud [EMAIL PROTECTED] wrote: Hi, this is not really a lazarus/FPC question, but it would help me if anyone would know about this: I set the TOpenDialog.InitialDir property to /mnt/floppy but when I execute: MyOpendialog.execute the content is empty of course because it is not mounted! Would anyone know how to mount the floppy from inside the lazarus application? Thank you. Alain _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Reducing Flickeron a TImage component
An updated (related) question would be whether there is any way to remove the flicker in THIS case: I have a couple of TBitBtn components. Appart from their captions and glyphs, I actually write some information to the canvasses which are meant to show up ON TOP of each glyph. A button may or may not contain info/may or may not currently be enabled ( these buttons represent actual computer terminals in the real world, and are updated based on what those terminals store in a database - when somebody logs into a terminal, the corresponding button should display his info and be enabled). The procedures I have for either updating or disabling buttons are below. A TTimer checks the database every second and then runs either UpdateBtn or ButtonOff depending on the particular button's current state. It all works quite well... (although before adding invalidates to each procedure it had a tendency to lose the caption) ... except it flickers something awful. Since I have no desire to cause massive epilepsy among my users, I would appreciate some advice here (this is a trickier one.. after all how do you double buffer a BUTTON ?) A.J. Procedure UpdateBtn(Button:TBitBtn;UserName,Time,Status:String); Begin Button.Glyph.Canvas.Clear; Button.Glyph.Assign(NewMainForm.Image1.Picture); Button.Glyph.Canvas.Font.Size := 18; Button.Glyph.Canvas.Font.Name := 'times'; Button.Glyph.Canvas.Font.Color := ClBlue; Button.Glyph.Canvas.TextOut(20,20,'User: '+Username); Button.Hint := UserName; Button.Glyph.Canvas.TextOut(20,50,'Time: '+Time); Button.Glyph.Canvas.TextOut(20,80,'Status: '+Status); Button.Invalidate; End; Procedure ButtonOff(Button:TbitBtn); Begin Button.Glyph.Canvas.Clear; Button.Glyph.Assign(NewMainForm.Image1.Picture); Button.Enabled := False; Button.Invalidate;; end; On 5/28/07, Dave Coventry [EMAIL PROTECTED] wrote: Gustavo, My problem was caused by the fact that the background for my TImage was black. When I placed it on a black-coloured panel (I used a TScrollBox as I want to capture mousewheel events), I found the flicker was more or less unoticeable. Gustavo Enrique Jimenez wrote: 2007/5/28, Dave Coventry [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]: Gustavo Enrique Jimenez wrote: There are good tutorials/examples on http://wiki.lazarus.freepascal.org/Developing_with_Graphics http://wiki.lazarus.freepascal.org/Developing_with_Graphics http://wiki.lazarus.freepascal.org/Developing_with_Graphics Gustavo, Thank you for your reply. But they don't really help. Do you draw a line to the Image1.Canvas? or do you draw to Image1.Picture.Bitmap.Canvas as suggested by the wiki? Which seems to make the flickering worse? Or do you need to suspend onPaint until you've finished drawing? In which case, how do you suspend onPaint? I have used the Create a custom control which draws itself method, and it worked very well !! Try this method. Gustavo ps: for the record, Felipe Monteiro help me A LOT in private mails. Thanks Felipe, and excuse me for bother you in private. -- Dave Coventry Tel (home): +27(0)31 3092301 Tel (office): +27(0)31 2058448 Cell: +27(0)82 9000179 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Reducing Flickeron a TImage component
On 5/29/07, Felipe Monteiro de Carvalho [EMAIL PROTECTED] wrote: On 5/29/07, A.J. Venter [EMAIL PROTECTED] wrote: I have a couple of TBitBtn components. Appart from their captions and glyphs, I actually write some information to the canvasses which are meant to show up ON TOP of each glyph. I would write my own fully custom-drawn button to do this. I was afraid you'd say that :) Now imagine my deadline is a few hours only and I have other outstanding functionality to code... A.J. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Reducing Flickeron a TImage component
Well I've reduced the flicker a little by doing a few small things (mostly not reloading images unless they have changed). I also set the DoubleBuffered property of the components to true, though I see no effect from doing so nor do I know what effect it's supposed to have. My understanding of doublebuffering (as I learned it doing things like SDL) is that it means that any changes to the component/canvas is drawn in memory NOT on screen, and only when they are all done do you update the component with one single action (drawing the memory buffer to the screen buffer - known commonly as a 'flip') - my TDoubleBuffer component is based on doing exactly that. What it means when you set the doublebuffered property of a button to true I don't know - though I would love to find out. A.J. On 5/29/07, Dave Coventry [EMAIL PROTECTED] wrote: AJ, In my case, when the image is redrawn, the TImage was cleared which showed the underlying colour (clBtnFace), which caused the flicker when the black background was painted in. I'm not sure of how relevant it would be in your case, but I changed the colour of the underlying panel to black, which eliminated the flicker. It would depend, I guess, on the colour of your graphic and the colour of the background displayed when it clears. (I'm not really auf fe with the TBitBtn components, having never used them). A.J. Venter wrote: On 5/29/07, Felipe Monteiro de Carvalho [EMAIL PROTECTED] wrote: On 5/29/07, A.J. Venter [EMAIL PROTECTED] wrote: I have a couple of TBitBtn components. Appart from their captions and glyphs, I actually write some information to the canvasses which are meant to show up ON TOP of each glyph. I would write my own fully custom-drawn button to do this. I was afraid you'd say that :) Now imagine my deadline is a few hours only and I have other outstanding functionality to code... A.J. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives -- Dave Coventry Tel (home): +27(0)31 3092301 Tel (office): +27(0)31 2058448 Cell: +27(0)82 9000179 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Reducing Flickeron a TImage component
DoubleBuffered is a hint for the interface. The gtk2 intf always paints double buffered for each gdkwindow. That means paint events are double buffered, other painting not. The gtk1 intf has almost no doublebuffering. I'm not sure about the other interfaces. Aaah okay, that makes sense. I only did a small test: The gtk intf only paints once per Invalidate and there I see no flicker at all. That's because the bitbtn glyph handle is a memory handle and not an image on the screen. Maybe the win32 intf is creating a screen handle? That would explain the flickering. This is a GTK1 app. The catch is that if I don't call invalidate, the buttons go entirely blank instead of merely being grayed out, this includes the captions. If I DO call invalidate, I end up with a whole LOT of repaints all the time - which is... well ugly to say the least. I am still not sure how best to approach this. Shouldn't the buttons remain in their last state, repainted when damaged until such time as they are changed ? I'm not even moving anything here just painting some info onto SOME of the buttons and updating those periodically while setting the others disabled until such time as they are in use. And it's the DISABLED buttons which are giving me grief, the enabled once have a very slight flicker but it's actually almost nothing (again I don't know why that would be). -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] PascalMagick - TPicture ?
Hi all, I've had some fun looking at the PascalMagick units which Felipe et. all did - and I must admit to being quite impressed. This however brings up immediately the question (for me at least) - how hard would it be to create a loader component similiar to Imaging4Lazarus which can load images supported by magick into TPicture ? That would immediately expand the list of available image formats to supported Lazarus apps by a very large amount. The second question I know has been asked before (but I am not aware of any consensus on it) and it may not be related - how can one go about adding supported for animated image formats (in particular gif and mng) to Lazarus ? Through a TPicture extension ? A completely sepperate component with animation (and probably double-buffer) support ? The immediate thought that occurs to me is that gif animations work by storing each frame in a layer, and using the layer descriptions to hold the time to display it. So a component with a series of dynamically created TPicture's which cycles the visible property between them according to the layer descriptions and places one layer in each TPicture could certainly do it. Will need some overhead and probably a TTimer integrated but it should certainly be doable - if you can at least have support to 1) load a single layer from a gif file into a TPicture 2) Get the layer descriptions from the gif file. I would be happy to code such a component if there is a consensus it will work like this, and somebody is willing to help me solve the 2 prerequisites (which could be done through a seperate library if needed - libungif ?) A.J. -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Linux service developing
Hiya Alvis I do quite a bit of daemon/service kina work in Linux/Lazarus so I'll try to help. In this week I did a small prototype of an application that I'm doing for linux with Lazarus. It open socket for remote visual control, mysql connections, and other nice things. This is a cool idea, but please keep the following in mind: When you create your project. You MUST choose commandline application - NOT graphical application, else your daemon will refuse to start (since gtk linked apps need to be stared INSIDE an active X-server, which is not existing in the init-phases of a Linux system). So my questions are...: 1) Does the kill on a linux service launch some onkill functions, or that's a kill-without-doing-anithing-else ? I'm thinking about using a soft close through the tcp connection with a command in the init.d/my_service stop like that: telnect localhost myport /my_service_suicide Are'nt there any ways to put some code into a onkill event of a linux process? This is not actually true :) The init scripts generally only make stop, start and restart available - but there are far more options in the Linux world. The kill command technically doesn't end a process, it sends it a signal which the process should respond to. Signal 15 is the one sent if none is specified and it means soft-kill - the application is TOLD to die, and left to do so by itself. Signal 9 is hard kill - which yanks the proggie right out of the system and kills it dead right away. This is typically used when a process crashed and it cannot do a proper soft-kill anymore. Other signals that a daemon should handle include signals for reload all configs etc. as well (many init scripts have a 'reload' option which triggers this, it is NOT meant to restart the daemon, but to force it to reread it's config files - for daemons supporting this, you can use it to load in updated config files without taking the service down first). The linux daemon demo shows how to handle all the important services. 2) How do I configure threads in linux? I mean... I'd like to change their name and aspect like other services do, and keep under control their behaviour (state, resume call times, speed, cpu usage, ecc). Threads and daemons aren't directly related. You create a daemon by FORK'ing the application. See yet again the daemon example which shows how this works very well. I personally suggest ANY modern daemon should AFTER the fork have code to get it's NEW pid and save this to /var/run/daemonname.pid so that init scripts can CLEANLY stop or restart it - this is the only thing NOT in the demo though (catch it sorta requires that your daemon have root privs but they usually do anyway). Threads CAN be used with daemons, usually AFTER the fork to allow the daemon to handle multiple tasks at once (e.g. multiple simultaneous clients will usually require threading the app). The best advice I can give HERE is to have a look at the TThread tutorial in the wiki - I learned threading from there -this is entirely platform neutral. 3) Does killing the main_unit (father) kills the processes? I tryed an example in wich I launch 2 thread before the main closes with the .end and they seem to survive, but having the father alive can be useful to control purposes... Like I said above - use a fork to create the daemon, not a thread, you can thread INSIDE but do it carefully. 4) What does the fpfork command used in the doing a service under linux example on your wiki? I'm a bit confused about it's behaviour, cause doing an if block with (pid=0) on it makes the program do both the if and the else in the same time... Nope it does not. :) A fork means the program creates a copy of itself into ram with all the same variable data etc. - but as a sepperate process. In the master, fpFork returns the pid of the fork, in the newly forked slave, it returns 0 - this means lets you know which process to end and which to keep running. Now you see why I say you thread AFTER forking ? 5) How can I access classes istances (or threads) created by their father from the different childs? I got a lot of recursive declaration errors trying to do that but I failed to access them with self.father.class like calls. This one I don't know, sorry. Ciao A.J. -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Office Menu Like
Well you could start with a TImage containing a rounded image within a transparent square for your rounded button, then set up your menu using the menu editor adding however many levels you need, and map it's show method that to the TImage.Onclick event. This is just a start though - the short version from here on in is, be creative, look at the original and then at your components and their abilities, and just modify pieces till it starts to fit. A.J. On 5/24/07, Carlos Avogaro [EMAIL PROTECTED] wrote: ok, guys, I would like to make a control menu like office 2007, it group many buttons and I would like to make that gradients that made the controls looks like 3D. I don't know if I could meke it from application, or I have to made firts in external bitmap. Thanks Graeme Geldenhuys [EMAIL PROTECTED] wrote: On 5/23/07, Paul Ishenin wrote: There was nothing about which office in original mail. Maybe author needs OpenOffice menu look :) 100% correct! Oh we are so clever today. :-) -- Graeme Geldenhuys General error, hit any user to continue. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s user panel and lay it on us. http://us.rd.yahoo.com/evt=48516/*http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 hot CTA = Join Yahoo!'s user panel -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] Cannot compile GTK2 lcl anymore
I don't know what changed but with neither fpc 2.3.1 nor 2.1.4 am I able to compile the LCL for GTK2 as unit gtkint fails to build. Here are the errors I am getting: PPU Loading /home/silentcoder/lazarus/lcl/units/i386-linux/gtk2/gtkint.ppu PPU Source: gtkint.pp not found PPU Source: gtkdefines.inc not found PPU Source: gtkwinapih.inc not found PPU Source: gtklclintfh.inc not found PPU Source: gtklistslh.inc not found PPU Source: gtkfiledialogutilsh.inc not found PPU Source: gtklistsl.inc not found PPU Source: gtkfiledialogutils.inc not found PPU Source: gtkobject.inc not found PPU Source: gtkwinapi.inc not found PPU Source: gtklclintf.inc not found PPU Source: gtkimages.lrs not found Any ideas ? -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] big projects using freepascal?
This big enough for you ? :) http://outkastsolutions.co.za/outkast/index.php?option=com_contenttask=viewid=33Itemid=1 A.J. On 5/24/07, Seth Grover [EMAIL PROTECTED] wrote: Hey guys. I work for a company that's thinking about doing a code port from Modula-2 here in a little while, and I'm looking for ammunition to convince them that Free Pascal is the way to go. It would be good if I had a list of mature/large/well-known products or projects or applications built with Free Pascal that I could show my superiors and say See?. Thanks in advance. -Seth -- Seth Grover sethdgrover[at]gmail[dot]com http://grovers.us/seth Who is John Galt? _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] SetWindowFullScreen broken
I tested with 2.3.1 [2007/04/30] for i386. I will try to get a newer one. Did you try another windowmanager? Not yet, but it doesn't seem to be related to window management. That is the version of the compiler I am running. Other thing is, I know of three functions: SetWindowFullScreen, GrabMouseToForm and GrabKeyBoardToForm. What are the other two functions ? ReleaseMouseFromForm and ReleaseKeyBoardFromForm Doh :) I'll revert to 2.1.4 as per Felipe's advice. A.J. -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Linux WriteLn - Staionary Output - how is done?
On 5/22/07, Felipe Monteiro de Carvalho [EMAIL PROTECTED] wrote: On 5/22/07, A.J. Venter [EMAIL PROTECTED] wrote: CRT is one way but rather relies on using the whole console. Anyway ncrt is safer. Sounds like you need something like this: uses ncrt; I got interrested on this, so I wrote a test program. I tested with both ncrt and crt, and actually I found that ncrt will erase the whole console and start writing from position (1,1), while crt will keep things that already exist on the console and start writing on the next line. So, for some uses, crt may be nicer. This is actually a side effect, there is another problem to consider: 1) crt wins for small environments since it needs no external libs 2) ncrt wins for all other cases even though it needs ncurses and clears the whole screen. The real difference is that ncrt is terminal independent - it works on anything unix supports (less of an issue in this day of virtual terminals with vt100 compatibility but still) - while crt uses ansi escape sequences - which are terminal specific. This has an opposite side though: you CAN use crt to set your console font color etc. - the changes will remain after your program exits, ncrt will not. So it's a case of which is your needs - for general console apps though - you should use ncrt because it's terminal independent and a LOT faster (ansi escapes take a long time to execute and make your whole program feel slow) A.J. program console; {$mode objfpc}{$H+} uses crt, SysUtils; // here you can change crt with ncrt begin Write('[] 0%'); GotoXY(1, WhereY); Sleep(200); Write('[= ] 10%'); GotoXY(1, WhereY); Sleep(200); Write('[===] 20%'); GotoXY(1, WhereY); Sleep(200); Write('[= ] 30%'); GotoXY(1, WhereY); Sleep(200); Write('[===] 40%'); GotoXY(1, WhereY); Sleep(200); Write('[= ] 50%'); GotoXY(1, WhereY); Sleep(200); end. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Linux WriteLn - Staionary Output - how is done?
Nope, Ncurses does not use escapes except in a very few esoteric cases. In fact ncurses was orriginally created to replace the old curses library. Curses had been an escape sequence based lib that was itself created orriginally to implement the game rogue. The move from curses to ncurses was primarilly motivated by the need to a terminal independent library to do the job. Curses could only run on terminals that supported the full ansi set, ncurses runs on almost any terminal. The person who did about 95% of the conversion of was Eric Raymond, and in the spirit of teh grandfather lib, the major reason for the task was to create nethack, which is a multiplatform rogue descendent - it needed a terminal independent lib to be that. Yes, I scare myself too. A.J. On 5/22/07, Albert Zeyer [EMAIL PROTECTED] wrote: Am Dienstag, den 22.05.2007, 10:09 +0200 schrieb A.J. Venter: So it's a case of which is your needs - for general console apps though - you should use ncrt because it's terminal independent and a LOT faster (ansi escapes take a long time to execute and make your whole program feel slow) Why is it faster? I always thought, that ncurses also uses escape sequences, but it is very optimized in that to minimize them. -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] SetWindowFullScreen broken
So should I then assume that nobody else can/will help me figure out how to fix this ? I must admit that (even though I wrote [most of] the orriginal functions in the gtk interface) I have no clue why the newer compiler would break them. A.J. On 5/18/07, A.J. Venter [EMAIL PROTECTED] wrote: On 5/18/07, Vincent Snijders [EMAIL PROTECTED] wrote: A.J. Venter schreef: Hi, Something has broken with SetWindowFullScreen, GrabMouseToForm and GrabKeyBoardToForm recently. Basically - though they throw no errors, they simply don't do anything at all. I believe the change happened after I upgraded to fpc 2.13 These functions are crucial for outkafe, I really need an answer quick. What question do you want to be answered? What changed which caused these functions to stop working and how can it be fixed ? A.J. -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] SetWindowFullScreen broken
On 5/21/07, Mattias Gaertner [EMAIL PROTECTED] wrote: On Mon, 21 May 2007 10:50:51 +0200 A.J. Venter [EMAIL PROTECTED] wrote: So should I then assume that nobody else can/will help me figure out how to fix this ? I must admit that (even though I wrote [most of] the orriginal functions in the gtk interface) I have no clue why the newer compiler would break them. I just tested: All 5 functions still work under gtk1 and gtk2 ubuntu/edgy (the 2 Release functions work too). Can you test with gtk2? Maybe your window manager does not support it? My status is that I have only tested with GTK1, I cannot compile GTK2 LCL since I upgraded the compiler (complains it cannot find gtkint), Just to make sure we are on the same page: [EMAIL PROTECTED] ~]$ ppc386 -l Free Pascal Compiler version 2.3.1 [2007/05/08] for i386 Copyright (c) 1993-2007 by Florian Klaempfl That is the version of the compiler I am running. Other thing is, I know of three functions: SetWindowFullScreen, GrabMouseToForm and GrabKeyBoardToForm. What are the other two functions ? A.J. -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Sample of Daemon (Service) Application...
There is a complete sample daemon in the linux demo apps for fpc. One hint: if you use lazarus for your ide you must choose commandline ap as your project type or your daemon will end up not being able to start at boot time (linked against libs that can only start under x11). Sorry no idea how this works under windows. On 5/21/07, Liyuan Garcia Caballero [EMAIL PROTECTED] wrote: Hi people. I need one sample of how buid a daemon or service application with lazarus 0.9.23 Thank, you. -- *Liyuán García Caballero* Especialista B en Ciencias Informáticas *Excelencia en Software* Desoft en Ciego de Ávila. Circunvalación Norte Esq. Ave. Las Palmas. Ciego de Ávila. Cuba. Telf.: (53 33) 22 8971, Fax:22 8792. e_mail: [EMAIL PROTECTED] _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] Linux WriteLn - Staionary Output - how is done?
CRT is one way but rather relies on using the whole console. Anyway ncrt is safer. Sounds like you need something like this: uses ncrt; ... write('i wrote this code'); window(1,wherey,80,wherey); clrscr; write('on my phone from memory'); Hope that helps. On 5/21/07, Lee Jenkins [EMAIL PROTECTED] wrote: Lee Jenkins wrote: Hi all, I'm wondering how to emulate the static console output seen with some linux applications such as yum. More specifically, static output without going to another line or appending to existing text already written such as this: Getting File: somefile.txt [=] 50% I hope that I explained my question well enough. Thanks! Thanks all, I'll take a look at the crt unit. -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] new GTK errors in the last week and crashes my apps
Well I tried building the LCL with GTK2 using fpc2.1.3 (note that it was working fine with 2.0.4 just a few days ago) - and it dies complaining of a missing unit gtkint. I have been meaning to report this - I cannot say whether the two are related though. A.J. On 5/18/07, Graeme Geldenhuys [EMAIL PROTECTED] wrote: Hi, In my last set of updates I got about a week ago, I started getting the following errors in my GTK1 based applications. I don't know if this relates to GTK2 as well, I don't develop for GTK2 yet. I'll be using my application and then suddenly I get output like the following to the console and the application is totally frozen. -- TGtkWidgetSet.DeleteObject GdiObject=B7B196A0 gdiBrush is still used. DCCount=1 DC: B7844160 0855CFE0=LCLWinapiClient [RMVDFStPr] LCLObject=B78735E0=sgOutcomes:TStringGridMainWidget=0855CDD0=LCLWinapiWidgetIs FixedWidgetIs CoreWidget ERROR in LCL: Creating gdb catchable error: $080F7EB8 RAISEGDBEXCEPTION, line 771 of lclproc.pas $08126800 RAISEGDIOBJECTISSTILLUSED, line 2425 of gtkwinapi.inc $08126361 TGTKWIDGETSET__DELETEOBJECT, line 2472 of gtkwinapi.inc $0815E3AF DELETEOBJECT, line 166 of ./include/winapi.inc $0816B8A7 TBRUSHHANDLECACHE__REMOVEITEM, line 24 of ./include/brush.inc $081D6212 TRESOURCECACHEITEM__DESTROY, line 184 of lclrescache.pas $0805F6D2 $081D62F1 TRESOURCECACHEITEM__DECREASEREFCOUNT, line 213 of lclrescache.pas $0816BDB5 TBRUSH__FREEHANDLE, line 209 of ./include/brush.inc --- I'm currently using Lazarus 0.9.23 (r11153) with FPC 2.1.3 (the fixes_2_2 branch with r7241). As I mentioned, about two weeks ago I never received such issues, but only with my last set op updates in started. I get this with any of my GTK1 based applications. From the error it clearly indicates to me that it is a LCL (GTK widgetset issue). Anybody else experiencing such problems. -- Graeme Geldenhuys General error, hit any user to continue. _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
[lazarus] SetWindowFullScreen broken
Hi, Something has broken with SetWindowFullScreen, GrabMouseToForm and GrabKeyBoardToForm recently. Basically - though they throw no errors, they simply don't do anything at all. I believe the change happened after I upgraded to fpc 2.13 These functions are crucial for outkafe, I really need an answer quick. A.J. -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
Re: [lazarus] SetWindowFullScreen broken
On 5/18/07, Vincent Snijders [EMAIL PROTECTED] wrote: A.J. Venter schreef: Hi, Something has broken with SetWindowFullScreen, GrabMouseToForm and GrabKeyBoardToForm recently. Basically - though they throw no errors, they simply don't do anything at all. I believe the change happened after I upgraded to fpc 2.13 These functions are crucial for outkafe, I really need an answer quick. What question do you want to be answered? What changed which caused these functions to stop working and how can it be fixed ? A.J. -- A.J. Venter CEO - OutKast Solutions C.C. http://www.outkastsolutions.co.za Cell: +27 83 455 9978 Fax: +27 21 413 2800 Office: +27 21 591 6766 _ To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject archives at http://www.lazarus.freepascal.org/mailarchives