Discussion:
[Gtk-sharp-list] Empty Properties from GUI
Sascha Manns
2017-02-02 11:57:24 UTC
Permalink
Hello,

after a week programming break i'm checking the properties.

Currently i'm putting input to the properties in Glade.cs:

PublicationTitle = entryTitle.Text;

Environment = cboEnvironment.ActiveText;

DocType = cboDocType.ActiveText;

Language = entryLanguage.Text;

In GetConfig.cs it reads the App.config and connects them to the
properties and gives out all properties on the terminal.
But it looks like the PublicationTitle, Environment, DocType and
Language are empty.
Can anyone help out?
Greetings Sascha
--
Sascha Manns
***@mailbox.org <mailto:***@mailbox.org>
GPG: 0x168428cdb1f20ab1
<http://pgpkey.org/pks/lookup?op=vindex&search=0x168428cdb1f20ab1&fingerprint=on>
jabber:***@jabber.org <jabber:***@jabber.org>


Maifeldstraße 10
56727 Mayen
mobile: +49-1573-9242730
home: +49-2651-4014045
https://saigkill.tuxfamily.org

Twitter <https://twitter.com/saigkill> Facebook
<https://www.facebook.com/sascha.manns> LinkedIn
<https://de.linkedin.com/in/saigkill> Skype <skype:schurik0815?call>
Github <https://github.com/saigkill> Xing
<https://www.xing.com/profile/Sascha_Manns4>
Sascha Manns
2017-02-03 12:25:48 UTC
Permalink
Hello list,
Post by Sascha Manns
Hello,
after a week programming break i'm checking the properties.
PublicationTitle = entryTitle.Text;
Environment = cboEnvironment.ActiveText;
DocType = cboDocType.ActiveText;
Language = entryLanguage.Text;
In GetConfig.cs it reads the App.config and connects them to the
properties and gives out all properties on the terminal.
But it looks like the PublicationTitle, Environment, DocType and
Language are empty.
Can anyone help out?
Greetings Sascha
The ok button launches the Publication.cs which launches the GetConfig.cs.
The URLs are:

* Glade.cs
(https://github.com/saigkill/PublicanCreators/blob/master/src/PublicanCreators/Glade.cs)
* Publican.cs
(https://github.com/saigkill/PublicanCreators/blob/master/src/PublicanCreators.Core/Publication.cs)
* GetConfig.cs
(https://https://github.com/saigkill/PublicanCreators/blob/master/src/PublicanCreators.Core/GetConfig.cs)

And if i'm checking the GUI given properties in GetConfig.cs, they are
empty.

Greetings
Sascha
--
<https://saigkill.tuxfamily.org>

Sascha Manns
***@mailbox.org <mailto:***@mailbox.org>
GPG: 0x168428cdb1f20ab1
<http://pgpkey.org/pks/lookup?op=vindex&search=0x168428cdb1f20ab1&fingerprint=on>
jabber:***@jabber.org <jabber:***@jabber.org>


Maifeldstraße 10
56727 Mayen
mobile: +49-1573-9242730
home: +49-2651-4014045
https://saigkill.tuxfamily.org

Twitter <https://twitter.com/saigkill> Facebook
<https://www.facebook.com/sascha.manns> LinkedIn
<https://de.linkedin.com/in/saigkill> Skype <skype:schurik0815?call>
Github <https://github.com/saigkill> Xing
<https://www.xing.com/profile/Sascha_Manns4>
Baltasar García Perez-Schofield
2017-02-04 09:53:23 UTC
Permalink
Hi, Sascha,
Post by Sascha Manns
PublicationTitle = entryTitle.Text;
Environment = cboEnvironment.ActiveText;
DocType = cboDocType.ActiveText;
Language = entryLanguage.Text;
In GetConfig.cs it reads the App.config and connects them to the
properties and gives out all properties on the terminal.
But it looks like the PublicationTitle, Environment, DocType and Language
are empty.
You're not connecting PublicationTitle, Environment or DocType to anything.
In getconfig.cs:

==
public static string PublicationTitle { get; set; }
public static string Environment { get; set; }
public static string DocType { get; set; }
...
var dictionary = new Dictionary<string, string>()
{
{"PublicationTitle", PublicationTitle},
{"DocType", DocType},
{"Environment", Environment},
{"Language", Language},
{"Firstname", Firstname},
{"Surname", Surname},
==

Those are the only apparitions of that properties in the class. Yes, the
other properties have data, since they are loaded from an XML file.

As far as I understand your project, you should create an instance of
GetConfig inside Glade, and when the "Run publication" button is pressed,
you should store that properties in GetConfig so they can have a value.

===
var config = new GetConfig();
config.PublicationTitle = PublicationTitle;
config.DocType = DocType;
condig.Language = Language;
===

-- Baltasar
Sascha Manns
2017-02-04 17:06:17 UTC
Permalink
Hi Baltasar,
Post by Baltasar García Perez-Schofield
Hi, Sascha,
Post by Sascha Manns
PublicationTitle = entryTitle.Text;
Environment = cboEnvironment.ActiveText;
DocType = cboDocType.ActiveText;
Language = entryLanguage.Text;
In GetConfig.cs it reads the App.config and connects them to the
properties and gives out all properties on the terminal.
But it looks like the PublicationTitle, Environment, DocType and
Language are empty.
You're not connecting PublicationTitle, Environment or DocType to
==
public static string PublicationTitle { get; set; }
public static string Environment { get; set; }
public static string DocType { get; set; }
...
var dictionary = new Dictionary<string, string>()
{
{"PublicationTitle", PublicationTitle},
{"DocType", DocType},
{"Environment", Environment},
{"Language", Language},
{"Firstname", Firstname},
{"Surname", Surname},
==
BTW: As i understood i can fill a property from one place and use the
value on another place. If the property is labeled as public it is
available in the whole solution. I'snt it so?
Post by Baltasar García Perez-Schofield
Those are the only apparitions of that properties in the class. Yes,
the other properties have data, since they are loaded from an XML file.
As far as I understand your project, you should create an instance of
GetConfig inside Glade, and when the "Run publication" button is
pressed, you should store that properties in GetConfig so they can
have a value.
===
var config = new GetConfig();
config.PublicationTitle = PublicationTitle;
config.DocType = DocType;
condig.Language = Language;
===
Thank you very much for that inspiration. I tried it out and:
PublicationTitle:
DocType: Book
Environment: Private
Language:

So the comboboxtext elements are placing the value on the right place.
Can i do anything to make the entrybox value available too?

Greetings Sascha
--
<https://saigkill.tuxfamily.org>

Sascha Manns
***@mailbox.org <mailto:***@mailbox.org>
GPG: 0x168428cdb1f20ab1
<http://pgpkey.org/pks/lookup?op=vindex&search=0x168428cdb1f20ab1&fingerprint=on>
jabber:***@jabber.org <jabber:***@jabber.org>


Maifeldstraße 10
56727 Mayen
mobile: +49-1573-9242730
home: +49-2651-4014045
https://saigkill.tuxfamily.org

Twitter <https://twitter.com/saigkill> Facebook
<https://www.facebook.com/sascha.manns> LinkedIn
<https://de.linkedin.com/in/saigkill> Skype <skype:schurik0815?call>
Github <https://github.com/saigkill> Xing
<https://www.xing.com/profile/Sascha_Manns4>
Baltasar García Perez-Schofield
2017-02-04 19:57:44 UTC
Permalink
Hi Sascha,

The fact of having public properties with the same name in classes, say, A
and B does not mean that instances of that clases automatically have that
properties in communication. If you want to share their values, you will
have to assign them explicitely. And certainly, they don't have to have the
same name.

===
var a = new A();
var b = new B();

a.Prop = b.Prop;
a.Prop3 = b.Prop4;
===

The sentences above are the only way to share values between properties
belonging to objects 'a' and 'b'.

-- Baltasar
Post by Sascha Manns
Hi Baltasar,
Hi, Sascha,
PublicationTitle = entryTitle.Text;
Environment = cboEnvironment.ActiveText;
DocType = cboDocType.ActiveText;
Language = entryLanguage.Text;
In GetConfig.cs it reads the App.config and connects them to the
properties and gives out all properties on the terminal.
But it looks like the PublicationTitle, Environment, DocType and Language
are empty.
You're not connecting PublicationTitle, Environment or DocType to
==
public static string PublicationTitle { get; set; }
public static string Environment { get; set; }
public static string DocType { get; set; }
...
var dictionary = new Dictionary<string, string>()
{
{"PublicationTitle", PublicationTitle},
{"DocType", DocType},
{"Environment", Environment},
{"Language", Language},
{"Firstname", Firstname},
{"Surname", Surname},
==
BTW: As i understood i can fill a property from one place and use the
value on another place. If the property is labeled as public it is
available in the whole solution. I'snt it so?
Those are the only apparitions of that properties in the class. Yes, the
other properties have data, since they are loaded from an XML file.
As far as I understand your project, you should create an instance of
GetConfig inside Glade, and when the "Run publication" button is pressed,
you should store that properties in GetConfig so they can have a value.
===
var config = new GetConfig();
config.PublicationTitle = PublicationTitle;
config.DocType = DocType;
condig.Language = Language;
===
DocType: Book
Environment: Private
So the comboboxtext elements are placing the value on the right place. Can
i do anything to make the entrybox value available too?
Greetings Sascha
--
<https://saigkill.tuxfamily.org>
Sascha Manns
GPG: 0x168428cdb1f20ab1
<http://pgpkey.org/pks/lookup?op=vindex&search=0x168428cdb1f20ab1&fingerprint=on>
Maifeldstraße 10
56727 Mayen
mobile: +49-1573-9242730
home: +49-2651-4014045
https://saigkill.tuxfamily.org
[image: Twitter] <https://twitter.com/saigkill> [image: Facebook]
<https://www.facebook.com/sascha.manns> [image: LinkedIn]
<https://de.linkedin.com/in/saigkill> [image: Skype] [image: Github]
<https://github.com/saigkill> [image: Xing]
<https://www.xing.com/profile/Sascha_Manns4>
_______________________________________________
http://lists.dot.net/mailman/listinfo/gtk-sharp-list
Sascha Manns
2017-02-05 12:59:22 UTC
Permalink
Hi Baltasar,

Am Samstag, den 04.02.2017, 19:57 +0000 schrieb Baltasar García Perez-
Post by Baltasar García Perez-Schofield
Hi Sascha,
The fact of having public properties with the same name in classes,
say, A and B does not mean that instances of that clases
automatically have that properties in communication. If you want to
share their values, you will have to assign them explicitely. And
certainly, they don't have to have the same name.
===
var a = new A();
var b = new B();
a.Prop = b.Prop;
a.Prop3 = b.Prop4;
===
The sentences above are the only way to share values between
properties belonging to objects 'a' and 'b'.
-- Baltasar
Thank you very much for your help so far. :-)

Currently just the entryboxes are without values. Maybe anyone knows,
how to fix that?

Greetings
Sascha
-- 


    
        
            

        
    
    Sascha Manns
       
      

      ***@mailbox.org

      GPG:
      0x168428cdb1f20ab1

      jabber:
      ***@jabber.org
    

              
        
 Maifeldstraße 10

         56727 Mayen

        mobile: +49-1573-9242730

         home: +49-2651-4014045
        

        https://saigkill.tuxfamily.org
      

    
    
      
    
    
      
    
    
      
    
    
      
    
    
    
    
      
    
    
      
    
    
    
      
    
    
      
    
    
    
      
    
    
      
    
    
    
      
    
    
      
    
    
    

    
  
Baltasar García Perez-Schofield
2017-02-06 07:51:11 UTC
Permalink
Hi, Sascha,

Instead of writing handles for the InsertAtCursor signals, which are quite
specific, try just with the "changed" signal.

-- Baltasar
Post by Sascha Manns
Hi Baltasar,
Am Samstag, den 04.02.2017, 19:57 +0000 schrieb Baltasar García
Hi Sascha,
The fact of having public properties with the same name in classes, say, A
and B does not mean that instances of that clases automatically have that
properties in communication. If you want to share their values, you will
have to assign them explicitely. And certainly, they don't have to have the
same name.
===
var a = new A();
var b = new B();
a.Prop = b.Prop;
a.Prop3 = b.Prop4;
===
The sentences above are the only way to share values between properties
belonging to objects 'a' and 'b'.
-- Baltasar
Thank you very much for your help so far. :-)
Currently just the entryboxes are without values. Maybe anyone knows, how
to fix that?
Greetings
Sascha
--
<https://saigkill.tuxfamily.org>
Sascha Manns
GPG: 0x168428cdb1f20ab1
<http://pgpkey.org/pks/lookup?op=vindex&search=0x168428cdb1f20ab1&fingerprint=on>
Maifeldstraße 10
56727 Mayen
mobile: +49-1573-9242730 <+49%201573%209242730>
home: +49-2651-4014045 <+49%202651%204014045>
https://saigkill.tuxfamily.org
[image: Twitter] <https://twitter.com/saigkill> [image: Facebook]
<https://www.facebook.com/sascha.manns> [image: LinkedIn]
<https://de.linkedin.com/in/saigkill> [image: Skype] [image: Github]
<https://github.com/saigkill> [image: Xing]
<https://www.xing.com/profile/Sascha_Manns4>
_______________________________________________
http://lists.dot.net/mailman/listinfo/gtk-sharp-list
Sascha Manns
2017-02-06 08:57:38 UTC
Permalink
Hi Baltasar,

Am Montag, den 06.02.2017, 07:51 +0000 schrieb Baltasar García Perez-
Post by Baltasar García Perez-Schofield
Hi, Sascha,
Instead of writing handles for the InsertAtCursor signals, which are
quite specific, try just with the "changed" signal.
That works. Thank you very much :-)

Loading...