271 base_type = self.ParentWindow.Controler.GetBaseType(variable_type) |
271 base_type = self.ParentWindow.Controler.GetBaseType(variable_type) |
272 |
272 |
273 if values[2] is not None: |
273 if values[2] is not None: |
274 base_location_type = self.ParentWindow.Controler.GetBaseType(values[2]) |
274 base_location_type = self.ParentWindow.Controler.GetBaseType(values[2]) |
275 if values[2] != variable_type and base_type != base_location_type: |
275 if values[2] != variable_type and base_type != base_location_type: |
276 message = _("Incompatible data types between \"%s\" and \"%s\"")%(values[2], variable_type) |
276 message = _("Incompatible data types between \"{a1}\" and \"{a2}\"").\ |
|
277 format(a1 = values[2], a2 = variable_type) |
277 |
278 |
278 if message is None: |
279 if message is None: |
279 if not location.startswith("%"): |
280 if not location.startswith("%"): |
280 if location[0].isdigit() and base_type != "BOOL": |
281 if location[0].isdigit() and base_type != "BOOL": |
281 message = _("Incompatible size of data between \"%s\" and \"BOOL\"")%location |
282 message = _("Incompatible size of data between \"%s\" and \"BOOL\"")%location |
282 elif location[0] not in LOCATIONDATATYPES: |
283 elif location[0] not in LOCATIONDATATYPES: |
283 message = _("Unrecognized data size \"%s\"")%location[0] |
284 message = _("Unrecognized data size \"%s\"")%location[0] |
284 elif base_type not in LOCATIONDATATYPES[location[0]]: |
285 elif base_type not in LOCATIONDATATYPES[location[0]]: |
285 message = _("Incompatible size of data between \"%s\" and \"%s\"")%(location, variable_type) |
286 message = _("Incompatible size of data between \"{a1}\" and \"{a2}\"").\ |
|
287 format(a1 = location, a2 = variable_type) |
286 else: |
288 else: |
287 dialog = wx.SingleChoiceDialog(self.ParentWindow.ParentWindow.ParentWindow, |
289 dialog = wx.SingleChoiceDialog(self.ParentWindow.ParentWindow.ParentWindow, |
288 _("Select a variable class:"), _("Variable class"), |
290 _("Select a variable class:"), _("Variable class"), |
289 [_("Input"), _("Output"), _("Memory")], |
291 [_("Input"), _("Output"), _("Memory")], |
290 wx.DEFAULT_DIALOG_STYLE|wx.OK|wx.CANCEL) |
292 wx.DEFAULT_DIALOG_STYLE|wx.OK|wx.CANCEL) |