Comments (9)
Assigning this in the constructor was always a bit of a hack. Looks like i'm forced to finally implement a proper solution.
from gtkd.
I didn't even know this = null;
was legal. It does seem nice ;)
But I've been checking the history for that file and it used to just throw an exception. I don't see why someone got rid of that.
from gtkd.
The constructors get called from Gtkd functions which return those objects or null, so an exception would be cumbersome in those cases as it's perfectly valid for those functions to return null.
Also for Classes that are derived from ObjectG the constructor also reassigns this to a previously constructed object.
from gtkd.
I think thoses functions you were talking about should check if, e.g., the atkAction is NULL, so then it won't be the constructor's 'problem'.
What I'm saying is that I think the single responsibility principle should definitely be 'applied' in this situation.
from gtkd.
Here's an example of what I meant:
Action action = atkAction ? new Action(atkAction) : null;
I noticed you've removed quite some lines ;)
The directory gio
still won't compile; can I help/assist you with anything?
from gtkd.
I think i've got all of them, i still heve to try compiling with 2.061 though.
from gtkd.
Well, GtkD compiles using the latest version of dmd/druntime/phobos. So that's great ;)
But when I include the library in an project of mine, upon linking it gives the following error:
/usr/local/lib/libgtkd-2.a(Loader.o): In function `_D4gtkc6Loader12pLoadLibraryFAyaE4gtkc6Loader4RTL--- errorlevel 1
DZPv':
src/gtkc/Loader.d:(.text._D4gtkc6Loader12pLoadLibraryFAyaE4gtkc6Loader4RTLDZPv+0x2f): undefined reference to `dlopen'
src/gtkc/Loader.d:(.text._D4gtkc6Loader12pLoadLibraryFAyaE4gtkc6Loader4RTLDZPv+0x38): undefined reference to `dlerror'
/usr/local/lib/libgtkd-2.a(Loader.o): In function `_D4gtkc6Loader10pGetSymbolFPvAyaZPv':
src/gtkc/Loader.d:(.text._D4gtkc6Loader10pGetSymbolFPvAyaZPv+0x2c): undefined reference to `dlsym'
src/gtkc/Loader.d:(.text._D4gtkc6Loader10pGetSymbolFPvAyaZPv+0x35): undefined reference to `dlerror'
/usr/local/lib/libgtkd-2.a(Loader.o): In function `_D4gtkc6Loader14pUnloadLibraryFPvZi':
src/gtkc/Loader.d:(.text._D4gtkc6Loader14pUnloadLibraryFPvZi+0x9): undefined reference to `dlclose'
collect2: error: ld returned 1 exit status
Too be honest, I don't know what the cause of this could be.
Edit:
Is there a C-library of some kind I need to use?
extern(C)
{
void* dlopen(char*, int);
char* dlerror();
void* dlsym(void*,char*);
int dlclose(void*);
}
from gtkd.
Yes, you'll need libdl.
Add:
-L-ldl
to the dmd commandline.
from gtkd.
Thanks! It works :) 👍
from gtkd.
Related Issues (20)
- [QUESTION] MainWindow or ApplicationWindow? HOT 4
- Add Support for Composite Templates HOT 2
- Status of custom GObjects HOT 4
- Wrong code format in Widget.d
- Add Gda bindings
- Undefined reference to _D3std6string9toStringzFNaNbNeMNkAyaZPya with ldc2 HOT 11
- bindings for LibAdwaita HOT 3
- Memory allocation failed when compiling with gdc HOT 1
- ListBoxItem toggle_refs_notify: assertion failed HOT 1
- How to Wrap GObject Introspection-based libraries for begginers HOT 4
- cairo win32 support
- New release? HOT 2
- wrapper for Dialog.getHeaderBar returns Widget instead of HeaderBar HOT 1
- Compile failed on Linux with gdc
- GTK4 HOT 2
- Unicode.utf8Validate issue ? HOT 5
- Gtk4 fails loading some icons HOT 1
- Create new tag/release for 3.11
- Need Gtk+ runtime in zip format
- [runtime win x64] Unable to verify timestamp for libgtk-3-0.dll
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gtkd.