FLTK logo

Re: [fltk.general] how can i declare & define Browser callback?

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: how can i declare & define Browser callback? imm Jun 19, 2021  
 
On Sat, 19 Jun 2021, 09:55 Dave Jordan wrote:

As soon as I wrap my head around all these other new C++ concepts I will go back and add appropriate access specifiers.
For now there is little chance i will misapply my own functions/methods and i need to follow KISS.

Indeed, it sounds like a lot of the issue here is really just to do with the syntax of C/C++ and what constitutes "normal" practice in that syntax.

If it's unfamiliar to you, then anything can be tricky...

That said, most of the ALGOL style languages have broadly the same concept of scope and encapsulation and it's certainly the case that restricting the scope of elements usually prevents more problems than it causes, so it's generally a good idea to do that from the outset (and not try to shoehorn it in later!)

In terms of how that is done, fltk is pretty much like any simple C++ code, so general C++ examples are usually relevant.

We tend to show our samples packed into a single file for simplicity; the implicit assumption is that folk picking up fltk already know C++, of course, and will understand how to extend from there.

But if C++ is unfamiliar, then our examples are probably not the best teaching resource available for idiomatic C++ coding!
--
Ian
From my Fairphone FP3

--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/CAGFM6db4ZcTQkg3Q_2Och4sSJX0E6G_%2BQ492c6a4%3DncO89QFMw%40mail.gmail.com.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.