[Gtk-sharp-list] Empty Properties from GUI

Baltasar García Perez-Schofield baltasarq at gmail.com
Sat Feb 4 19:57:44 UTC 2017


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

El sáb., 4 feb. 2017 18:03, Sascha Manns <Sascha.Manns at mailbox.org>
escribió:

> Hi Baltasar,
>
> On 04.02.2017 10:53, Baltasar García Perez-Schofield wrote:
>
> Hi, Sascha,
>
> 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.
>
>
> 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},
> ==
>
> 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;
> ===
>
> 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
> Sascha.Manns at mailbox.org
> GPG: 0x168428cdb1f20ab1
> <http://pgpkey.org/pks/lookup?op=vindex&search=0x168428cdb1f20ab1&fingerprint=on>
> jabber: Sascha.Manns at jabber.org
>
>
> 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>
> _______________________________________________
> Gtk-sharp-list maillist  -  Gtk-sharp-list at lists.dot.net
> http://lists.dot.net/mailman/listinfo/gtk-sharp-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.dot.net/pipermail/gtk-sharp-list/attachments/20170204/3a5c7a32/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Saschasmall.jpg
Type: image/jpeg
Size: 31166 bytes
Desc: not available
URL: <http://lists.dot.net/pipermail/gtk-sharp-list/attachments/20170204/3a5c7a32/attachment-0001.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: twitter.png
Type: image/png
Size: 1418 bytes
Desc: not available
URL: <http://lists.dot.net/pipermail/gtk-sharp-list/attachments/20170204/3a5c7a32/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: spacer.gif
Type: image/gif
Size: 1097 bytes
Desc: not available
URL: <http://lists.dot.net/pipermail/gtk-sharp-list/attachments/20170204/3a5c7a32/attachment-0002.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: facebook.png
Type: image/png
Size: 956 bytes
Desc: not available
URL: <http://lists.dot.net/pipermail/gtk-sharp-list/attachments/20170204/3a5c7a32/attachment-0007.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: linkedin.png
Type: image/png
Size: 1141 bytes
Desc: not available
URL: <http://lists.dot.net/pipermail/gtk-sharp-list/attachments/20170204/3a5c7a32/attachment-0008.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: skype.png
Type: image/png
Size: 1632 bytes
Desc: not available
URL: <http://lists.dot.net/pipermail/gtk-sharp-list/attachments/20170204/3a5c7a32/attachment-0009.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: github.png
Type: image/png
Size: 2345 bytes
Desc: not available
URL: <http://lists.dot.net/pipermail/gtk-sharp-list/attachments/20170204/3a5c7a32/attachment-0010.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xing.png
Type: image/png
Size: 2636 bytes
Desc: not available
URL: <http://lists.dot.net/pipermail/gtk-sharp-list/attachments/20170204/3a5c7a32/attachment-0011.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: spacer.gif
Type: image/gif
Size: 1097 bytes
Desc: not available
URL: <http://lists.dot.net/pipermail/gtk-sharp-list/attachments/20170204/3a5c7a32/attachment-0003.gif>


More information about the Gtk-sharp-list mailing list