It is currently Mon Dec 11, 2017 5:06 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 116 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7, 8  Next
Author Message
 Post subject: Re: PureBasic Docs- Ideas/Help needed for a "We start" chapt
PostPosted: Tue Sep 29, 2015 10:56 am 
Offline
Addict
Addict
User avatar

Joined: Tue Aug 11, 2009 1:56 pm
Posts: 860
Location: Essen (Germany)
Hello my friends ~ Guess what!

The translation is completed :D ... in such a short time 8)

... so we likely gonna have a triple-languaged-PB-UGuide soon

_________________
Two growing code-collections: WinApi-Lib by RSBasic ~ LinuxAPI-Lib by Omi

Missing a download-file on the forums? ~ check out this backup page.


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic Docs- Ideas/Help needed for a "We start" chapt
PostPosted: Tue Sep 29, 2015 10:24 pm 
Offline
PureBasic Team
PureBasic Team
User avatar

Joined: Fri Apr 25, 2003 6:14 pm
Posts: 1391
Location: Germany (Saxony, Deutscheinsiedel)
@Vera: Voila and thanks! :mrgreen:

Now it's time to include this chapters in the Index etc. of the CHM reference manual. This is up to Fred! 8)

And maybe there are some more ideas/contributions for new chapters, which should be included in the beginners sections!?

_________________
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic Docs- Ideas/Help needed for a "We start" chapt
PostPosted: Thu Oct 01, 2015 11:01 pm 
Offline
Addict
Addict
User avatar

Joined: Tue Aug 11, 2009 1:56 pm
Posts: 860
Location: Essen (Germany)
Hello to all french-speaking members,

I have bundled a standalone preview of the new french UserGuide for everyone to take a look:
- (update: typos - thanks to GG / fixes & enhancements)

enjoy :)
... and if you have specific hints or suggestion please let me know via pm for not to derail this thread.

Andre wrote:
And maybe there are some more ideas/contributions for new chapters, which should be included in the beginners sections!?
Yes that would be nice.
Mesa suggested yesterday to include more smaller examples and add pictures ... making it 'more thrilling' (if I may say) to walk&work through the sections.

greets ~ Vera

_________________
Two growing code-collections: WinApi-Lib by RSBasic ~ LinuxAPI-Lib by Omi

Missing a download-file on the forums? ~ check out this backup page.


Last edited by Vera on Fri Oct 02, 2015 8:58 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic Docs- Ideas/Help needed for a "We start" chapt
PostPosted: Fri Oct 02, 2015 9:09 am 
Offline
Enthusiast
Enthusiast

Joined: Tue Jul 26, 2005 12:02 pm
Posts: 205
Location: Lieusaint (77), France
Thanks a lot Vera !

I suggested a few corrections in the >> french forum in the right thread <<. Can I continue with this method (name of html file + correction) through the whole document ?

_________________
Purebasic 5.51 64 bits - Windows 7 Pro 64 bits SP1


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic Docs- Ideas/Help needed for a "We start" chapt
PostPosted: Thu Oct 08, 2015 1:30 pm 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 13142
Location: France
Topic cleaned.


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic Docs- Ideas/Help needed for a "We start" chapt
PostPosted: Fri Oct 23, 2015 6:30 am 
Offline
Enthusiast
Enthusiast

Joined: Fri Aug 28, 2015 6:10 pm
Posts: 729
Location: Portugal
I have not read the whole thread so please delete if allready mentioned.

The heart of any PB programme is the main event loop and how to process events. Not the individual events etc just how it all works.

Recent experience with PB has shown me that there is a lot of misunderstanding surrounding the event processing loop especially when it comes to programming multiple window applications.

A lot of programmers come from VB etc where they are shielded from the event loops, or use basics which do not expose the event loop so I feel this should be the first chapter.

_________________
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic Docs- Ideas/Help needed for a "We start" chapt
PostPosted: Sat Nov 14, 2015 10:19 pm 
Offline
Enthusiast
Enthusiast

Joined: Fri Aug 28, 2015 6:10 pm
Posts: 729
Location: Portugal
No reply so wrote a little tutorial of my own.

had to post here:-

http://www.codeinbasic.com/index.php?topic=260.0

As I cannot upload a zip file to this forum.

Hope all newbies enjoy

_________________
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic Docs- Ideas/Help needed for a "We start" chapt
PostPosted: Sun Nov 15, 2015 8:19 am 
Offline
Addict
Addict
User avatar

Joined: Sat Feb 19, 2011 3:47 am
Posts: 1948
collectordave wrote:
...wrote a little tutorial of my own.
http://www.codeinbasic.com/index.php?topic=260.0

Hope all newbies enjoy

Based on this little excerpt from that tutorial, some words of caution for the newbies:

Image

PureBasic recommends against doing so:
PureBasic Manual wrote:
Indexed numbering
The static, indexed way, allows you to reference an object by a predefined numeric value. The first available index number is 0 and subsequent indexes are allocated sequentially. This means that if you use the number 0 and then the number 1000, 1001 indexes will be allocated and 999 (from 1 to 999) will be unused, which is not an efficient way to use indexed objects. If you need a more flexible method, use the dynamic way of allocating objects...
While this may not be evident in the size of the compiled binary, it could be clearly seen in the memory footprint that the executable occupies; simply assigning a large static object number would increase the memory usage by 100Kb.

Furthermore, it should be noted that when utilising dynamic object numbering, the allocated object number should be assigned to a variable, as it would invariably be required further down the execution.

The perils of vanity publishing. :lol:

_________________
Texas Instruments 99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too!


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic Docs- Ideas/Help needed for a "We start" chapt
PostPosted: Sun Nov 15, 2015 8:34 am 
Offline
Enthusiast
Enthusiast

Joined: Fri Aug 28, 2015 6:10 pm
Posts: 729
Location: Portugal
Hi All

As you read more of the tutorial chapters 1 to 5 you will see that I agree with this.

Quote:
Furthermore, it should be noted that when utilising dynamic object numbering, the allocated object number should be assigned to a variable, as it would invariably be required further down the execution.


I abandoned using enumerations and assigning my own numbers to windows and gadgets in favour of assigning the allocated object number to variables for use later down the line. This can also become a pain trying to invent variable names for all the allocated object numbers so also started to use the module feature of PB to keep variable names isolated. Just imagine using five windows, each with Ok and Cancel buttons. Using modules you can use btnOk and btnCancel as variables for each and all the Ok and Cancel buttons on all windows no need to think of btnOk1,btnOk2 etc. This is explained in the tutorial.

_________________
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic Docs- Ideas/Help needed for a "We start" chapt
PostPosted: Sun Nov 15, 2015 8:41 am 
Offline
Addict
Addict
User avatar

Joined: Thu Jun 04, 2015 7:10 am
Posts: 1673
TI-994A thats interesting thankyou for pointing that out. I too wrongly assumed we could use any value without performance penalty
Code:
hFile1 = CreateFile(0, "file1.tmp")           <-- Process memory=1,756kb
hFile2 = CreateFile(50000000, "file2.tmp")    <-- Process memory=197,492kb    = 4 bytes reserved for each handle in the array on my Win32 (double that for handles on 64?)
Hopefully nobody has created their own GetFreeHandle function that returns a random value up to $7FFFFFFF heehee :)

_________________
Thankyou to all the coders who generously helped & encouraged me in the nearly 2yrs when i was welcome here,
it was a tremendous privilege. I learned a lot. I wish you and your families all the best and success for the future.


Last edited by Keya on Sun Nov 15, 2015 9:17 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic Docs- Ideas/Help needed for a "We start" chapt
PostPosted: Sun Nov 15, 2015 9:08 am 
Offline
Addict
Addict
User avatar

Joined: Sat Feb 19, 2011 3:47 am
Posts: 1948
collectordave wrote:
TI-994A wrote:
Furthermore, it should be noted that when utilising dynamic object numbering, the allocated object number should be assigned to a variable, as it would invariably be required further down the execution.
I abandoned using enumerations and assigning my own numbers to windows and gadgets in favour of assigning the allocated object number to variables for use later down the line. This can also become a pain trying to invent variable names for all the allocated object numbers so also started to use the module feature of PB to keep variable names isolated. Just imagine using five windows, each with Ok and Cancel buttons. Using modules you can use btnOk and btnCancel as variables for each and all the Ok and Cancel buttons on all windows no need to think of btnOk1,btnOk2 etc. This is explained in the tutorial.

I have absolutely no idea what you mean, but I was referring to this (the second highlighted block):

Image

Dynamic object numbering should be formatted like so:
Code:
winNumber = OpenWindow(#PB_Any, 0, 0, 270, 280, "Fruit & Veg", #PB_Window_SystemMenu)
Without the variable, winNumber, there's no way to refer to the window after it is initialised.

_________________
Texas Instruments 99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too!


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic Docs- Ideas/Help needed for a "We start" chapt
PostPosted: Sun Nov 15, 2015 9:38 am 
Offline
Enthusiast
Enthusiast

Joined: Fri Aug 28, 2015 6:10 pm
Posts: 729
Location: Portugal
Quote:
Without the variable, winNumber, there's no way to refer to the window after it is initialised.


That is correct and as you read through the tutorial chapters that is also explained.

_________________
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic Docs- Ideas/Help needed for a "We start" chapt
PostPosted: Mon Nov 16, 2015 8:56 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon May 09, 2011 9:36 am
Posts: 346
TI-994A ,
would my Code below be OK to use ?? ... any problems with it ??


Code:
   
     #Window_0 = 4800         ;~~~~~ Main Program Window

    wFlags = #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_ScreenCentered
    WinX = 0 : WinY = 0 : WinWidth = 1028 : WinHeight = 740
    OpenWindow(#Window_0, WinX, WinY, WinWidth, WinHeight, "", wFlags )

_________________
 
PureBasic .... making little electrons do what you want !


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic Docs- Ideas/Help needed for a "We start" chapt
PostPosted: Mon Nov 16, 2015 6:47 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Feb 19, 2011 3:47 am
Posts: 1948
VB6_to_PBx wrote:
TI-994A ,
would my Code below be OK to use ?? ... any problems with it ??
Code:
#Window_0 = 4800
Although you could technically use large numbers as object identifiers, it simply isn't recommended.

Barring that, the snippet looks fine to me. :wink:

_________________
Texas Instruments 99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too!


Top
 Profile  
Reply with quote  
 Post subject: Re: PureBasic Docs- Ideas/Help needed for a "We start" chapt
PostPosted: Tue Nov 17, 2015 1:06 am 
Offline
Enthusiast
Enthusiast

Joined: Fri Aug 28, 2015 6:10 pm
Posts: 729
Location: Portugal
Quote:
#Window_0 = 4800


You answered that yourself!

Plus read the tutorail and I do not recommend it so why post?

_________________
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 116 posts ]  Go to page Previous  1 ... 3, 4, 5, 6, 7, 8  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye